Vedran Čačić added the comment: > 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23591> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com