[Python-Dev] Breaking undocumented API

Barry Warsaw barry at python.org
Thu Nov 11 16:01:25 CET 2010


On Nov 11, 2010, at 12:41 AM, Alexander Belopolsky wrote:

>Is it OK to add __all__ to such modules that does not include all
>names not starting with an underscore?  Is it OK to then remove names
>that clearly were not intended to be public?

I would say in general, yes.  It's a good small modernization and stdlib
improvement.  However, this shouldn't be done as a bug fix to a stable
release, and care must be taken to consider backward compatibility.  IOW, if
you really think it's a name that is not used publicly, or is usually only
imported explicitly, then I think it's fine leaving it out of __all__.  It's
not a difficult change to work around.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101111/527af79f/attachment.pgp>


More information about the Python-Dev mailing list