Message234442
I think it would be worth documenting
globals().update(MyEnumeration.__members__) in the "Interesting
Examples" section of the enum docs.
I suspect that most people will find that importing enums is annoying
because they'll get
import A
print(A.MyEnumeration.MAX)
when they're more used to
import A
print(A.MAX)
Of course the latter is easily achieved using the globals().update()
trick (as used in signals.py in 3.5).
Georg suggested I add this to the tracker. |
|
Date |
User |
Action |
Args |
2015-01-21 20:00:29 | mark | set | recipients:
+ mark, docs@python |
2015-01-21 20:00:29 | mark | set | messageid: <1421870429.3.0.139624304143.issue23292@psf.upfronthosting.co.za> |
2015-01-21 20:00:29 | mark | link | issue23292 messages |
2015-01-21 20:00:29 | mark | create | |
|