[Python-Dev] PEP 8 updates/clarifications
Ian Bicking
ianb at colorstudy.com
Sat Dec 10 00:24:29 CET 2005
Ian Bicking wrote:
> (Let's hope that these variables are meant for use inside one
> module only.) The conventions are about the same as those for
> functions. Modules that are designed for use via "from M import *"
> should prefix their globals (and internal functions and classes)
> with an underscore to prevent exporting them.
>
> It seems like __all__ is a better technique than leading underscores.
I think it should also go in (perhaps in the imports section) that
__all__ comes after the imports, but before code. I thought this was in
there already, because I know I've seen it documented elsewhere.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Python-Dev
mailing list