[Python-ideas] the error that raises an AttributeError should be passed to __getattr__
Steven D'Aprano
steve at pearwood.info
Mon Jun 19 22:44:12 EDT 2017
On Mon, Jun 19, 2017 at 07:36:09PM -0700, Ethan Furman wrote:
> 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'.
Can you explain further? What's special about value and name?
--
Steve
More information about the Python-ideas
mailing list