[Python-Dev] Breaking undocumented API (original) (raw)

Fred Drake fdrake at acm.org
Thu Nov 18 14:47:05 CET 2010


On Thu, Nov 18, 2010 at 6:41 AM, Michael Foord <fuzzyman at voidspace.org.uk> wrote:

Along with the others +1

I agree with keeping these distinct and orthogonal as well.

What is more important is that we have a clearly stated policy for new modules and adding names to existing modules so that we don't have to repeat this debate in five years time.

Agreed again.

My suggestion, which fits in with the use of all by the language and also the convention widely in use by the community already boils down to:

* If all exists it is definitive

I think this is overly vague. :-)

Specifically, if something is mentioned in all, it's public. Non-inclusion in all doesn't imply privateness.

* Names with leading underscores are private unless in all (and if you want to export leading underscore names as part of a public API you should define all or "import *" won't export them)

We shouldn't confuse non-export via "import *" with non-public, however.

  -Fred

-- Fred L. Drake, Jr.    "A storm broke loose in my mind."  --Albert Einstein



More information about the Python-Dev mailing list