[Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores
Barry Warsaw
barry at python.org
Tue Jul 16 17:19:17 CEST 2013
On Jul 16, 2013, at 11:28 AM, Richard Oudkerk wrote:
>BTW, how does the use of __all__ effect things? Somewhere I got the idea
>that if a module uses __all__ then anything not listed is internal. I take
>it that is wrong?
Purely technically, __all__ is there to affect how from-import-* works. I
personally think it's a good idea to include all your public names, and none
of your non-public names, in __all__, but it's not always easy to keep
up-to-date. pyflakes has the nice benefit of complaining when something is
named in __all__ that doesn't exist in the module, but that's only one part of
the keeping-things-up-to-date problem.
-Barry
More information about the Python-Dev
mailing list