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 eli.bendersky
Recipients barry, docs@python, eli.bendersky, ethan.furman, georg.brandl, mark, serhiy.storchaka
Date 2015-01-24.18:19:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422123549.04.0.447063856007.issue23292@psf.upfronthosting.co.za>
In-reply-to
Content
Georg, each library writer is entitled to do whatever she wants. Naturally, we can't prevent dumping contents of enums into the module namespaces, and yes, backwards compatibility makes sense for some modules.

However, that's tangential to *encouraging* this un-Pythonic behavior by including the trick in the official documentation. After all, namespaces is a good idea (from the Zen of Python), and Enums as namespaces are also a good idea (self-documenting code).

There's a huge amount of tricks we could add to the documentation, but we don't. There's wikis for that, blogs, Stack Overflow, Active Python recipes, what have you.

I wouldn't spend too much time arguing about this, though. If you feel strongly that this belongs in the standard documentation, go ahead. I just wanted to provide an alternative view of the issue.
History
Date User Action Args
2015-01-24 18:19:09eli.benderskysetrecipients: + eli.bendersky, barry, georg.brandl, mark, docs@python, ethan.furman, serhiy.storchaka
2015-01-24 18:19:09eli.benderskysetmessageid: <1422123549.04.0.447063856007.issue23292@psf.upfronthosting.co.za>
2015-01-24 18:19:09eli.benderskylinkissue23292 messages
2015-01-24 18:19:08eli.benderskycreate