[issue29752] Enum._missing_ not called for __getattr__ failures
Josh Rosenberg
report at bugs.python.org
Wed Mar 8 10:31:21 EST 2017
Josh Rosenberg added the comment:
Could that perhaps be intentional? Attribute access seems like something where the developer would be explicitly naming a single, hard coded, canonical name for the type, while string construction seems like something where you're getting a string from "somewhere" (user input, which is always terrible) and you'd want to have a way to handle invalid input.
The documentation is so sparse as to be useless for determining intent:
_missing_ – a lookup function used when a value is not found; may be overridden
I wouldn't view Label.redapple as an attempt to "find" anything, it's just simple attribute access.
----------
nosy: +josh.r
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29752>
_______________________________________
More information about the Python-bugs-list
mailing list