Message275743
> Which means it has methods such as __getitem__, __setitem__, etc., which means those methods can implement whatever is needed to give the namespace the desired semantics (within Python syntax).
Ah, _that_'s what you had in mind. (All this time, I thought _auto_ was just a shorter name for _generate_next_value_.:) I'm ok with that. But aren't we then back to square one? (Using magic of the same kind as the "declarative style" that Raymond pronounced not Pythonic enough.)
Even Raymond says
> As long as _auto_ has been defined somewhere (i.e. from enum import _auto_), it is normal Python
I'm sure he didn't think of the loophole you're currently exploiting. :-D
But anyway, I'm happy. Parentheses are there, so the intuition of calling a function to execute code is respected, and if you get out free with this hack, it opens a door a bit wider for complete declarative solution in the future. |
|
Date |
User |
Action |
Args |
2016-09-11 08:10:51 | veky | set | recipients:
+ veky, barry, rhettinger, ezio.melotti, r.david.murray, eli.bendersky, ethan.furman, python-dev, serhiy.storchaka |
2016-09-11 08:10:51 | veky | set | messageid: <1473581451.1.0.867666638191.issue23591@psf.upfronthosting.co.za> |
2016-09-11 08:10:51 | veky | link | issue23591 messages |
2016-09-11 08:10:50 | veky | create | |
|