You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xgetattr should really get tests, a decent docstring, and arguably fixes, too: the current version does different things for intermediate lookups than for the final lookup, for no obvious reason: for intermediate lookups, an actual value of None is replaced with default. For the final lookup, a value of None is left as None.
The text was updated successfully, but these errors were encountered:
On the fixes front, it's hard to change behaviour here since external packages are already using xgetattr or xsetattr.
This may be a good opportunity to think again about the behaviour we actually want, particularly with respect to None-handling, missing attributes, and default values, and recodify it under a better name or in a better place.
If the intent is to support retrieval of values represented by extended trait names on a HasTraits class, one option may be a method on HasTraits. (That would preclude re-using the same logic for doing extended imports, but that's a different use-case, and seems like a misuse of xgetattr in the first place.)
From #1239 (comment):
The text was updated successfully, but these errors were encountered: