[Python-ideas] the error that raises an AttributeError should be passed to __getattr__

Ethan Furman ethan at stoneleaf.us
Mon Jun 19 22:36:09 EDT 2017


On 06/19/2017 07:26 PM, Steven D'Aprano wrote:

> Or maybe we decide that it's actually a feature, not a problem, for an
> AttributeError inside self.attr.__get__ to look like self.attr is
> missing.

It's a feature.  It's why Enum classes can have members named 'value' and 'name'.

--
~Ethan~



More information about the Python-ideas mailing list