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 mark
Recipients docs@python, mark
Date 2015-01-21.20:00:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421870429.3.0.139624304143.issue23292@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-01-21 20:00:29marksetrecipients: + mark, docs@python
2015-01-21 20:00:29marksetmessageid: <1421870429.3.0.139624304143.issue23292@psf.upfronthosting.co.za>
2015-01-21 20:00:29marklinkissue23292 messages
2015-01-21 20:00:29markcreate