Message274979
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. |
|
Date |
User |
Action |
Args |
2016-09-08 06:45:26 | veky | set | recipients:
+ veky, barry, rhettinger, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, python-dev, serhiy.storchaka |
2016-09-08 06:45:26 | veky | set | messageid: <1473317126.71.0.57515907415.issue23591@psf.upfronthosting.co.za> |
2016-09-08 06:45:26 | veky | link | issue23591 messages |
2016-09-08 06:45:26 | veky | create | |
|