Eli Bendersky added the comment:

I'm not sure why the current situation is annoying?

Python explicitly does not pollute the enclosing namespace with an Enum's 
members. So when you:

import A

It's fairly natural that you have access to A.MyEnum and not its members, no? 
Some modules (like some stdlib modules) may choose to push the enum members up 
to the module's scope explicitly, but I wouldn't necessarily call it best 
practice. Namespacing is Pythonic, splashing contents of classes into enclosing 
namespaces isn't.

So I guess what I'm trying to say is that I don't see a reason to explicitly 
suggest something that is, in general, against the spirit of Python, in the 
documentation.

[P.S. Thanks for reporting, Mark, I love your books!]

----------

_______________________________________
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