A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-November/105533.html below:

[Python-Dev] Breaking undocumented API

[Python-Dev] Breaking undocumented API [Python-Dev] Breaking undocumented APIHrvoje Niksic hrvoje.niksic at avl.com
Fri Nov 12 10:49:48 CET 2010
On 11/11/2010 11:24 PM, Greg Ewing wrote:
> Nick Coghlan wrote:
>
>>  My personal opinion is that we should be trying to get the standard
>>  library to the point where __all__ definitions are unnecessary - if a
>>  name isn't in __all__, it should start with an underscore (and if that
>>  is true, then the __all__ definition becomes effectively redundant).
>
> What about names imported from other modules that are used by
> the module, but not intended for re-export? How would you
> prevent them from turning up in help() etc. without using
> __all__?

import foo as _foo

I believe I am not the only one who finds that practice ugly, but I find 
it just as ugly to underscore-ize every non-public helper function. 
__all__ is there for a reason, let's use it.  Maybe help() could 
automatically ignore stuff not in __all__, or display it but warn the 
user of non-public identifiers?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4