[issue26988] Add AutoNumberedEnum to stdlib
John Hagen
report at bugs.python.org
Sat Jul 9 13:02:14 EDT 2016
John Hagen added the comment:
> What happens with `property`?
>
> - `property` is looked up in the class namespace
Perhaps you've already considered this, I'm not intimately familiar with how classes are parsed and constructed but is it possible to determine if the object is a decorator? It already determines to stop auto-numbering when it hits the first method, could it stop when it hits the first decorator or method?
Being able to use temporaries is an interesting side effect, but I feel like that would be used less often than a @staticmethod, @property, or @classmethod over a method, in which case it becomes a little more complex.
That being said, I think either solution is valid.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26988>
_______________________________________
More information about the Python-bugs-list
mailing list