enthought / enthought/traits

Wouldn't it be possible to split getting and setting prefix traits?

Open
#1,760 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Wouldn't it be possible to split getting and setting prefix traits?

On getting, a value would be returned, when it has been set or the prefix trait has a default value. On the latter case, the prefixed trait could be created.
Setting would work just as it is currently.

Then no trait would exist where getting raises an exception.

Would this break the current functionality of prefix traits?

_Originally posted by @felixkol in https://github.com/enthought/traits/issues/1753#issuecomment-1678731053_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.