Vedran Čačić added the comment:
Since you like examples, what do you say about
class MyEnum(Enum):
red = some_function()
blue = red
Now, is MyEnum.blue the same as MyEnum.red (watch: not "equal", but "same")?
Well, it depends on what some_function returns, right? If it returns _auto_,
they are not the same, but in all the other cases, blue is just an alias for
red. So object identity depends on some value that could be external to the
class. To me that's obviously unacceptable.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue23591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com