Eli Bendersky added the comment:

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.

----------

_______________________________________
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

Reply via email to