New submission from Mark Summerfield: 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. ---------- assignee: docs@python components: Documentation files: py-enum.tar.gz messages: 234442 nosy: docs@python, mark priority: normal severity: normal status: open title: Enum doc suggestion type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file37809/py-enum.tar.gz _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23292> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com