This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author veky
Recipients barry, eli.bendersky, ethan.furman, ezio.melotti, python-dev, r.david.murray, rhettinger, serhiy.storchaka, veky
Date 2016-09-08.06:45:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473317126.71.0.57515907415.issue23591@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-09-08 06:45:26vekysetrecipients: + veky, barry, rhettinger, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, python-dev, serhiy.storchaka
2016-09-08 06:45:26vekysetmessageid: <1473317126.71.0.57515907415.issue23591@psf.upfronthosting.co.za>
2016-09-08 06:45:26vekylinkissue23591 messages
2016-09-08 06:45:26vekycreate