A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/070881.html below:

[Python-Dev] __dir__ and __all__

[Python-Dev] __dir__ and __all__ [Python-Dev] __dir__ and __all__Josiah Carlson jcarlson at uci.edu
Sun Feb 4 20:34:31 CET 2007
See the two threads started in python-dev by Tomer Filiba on (according
to my clock) July 6, 2006 and October 6, 2006, both have __dir__ in the
subject.

 - Josiah

Giovanni Bajo <rasky at develer.com> wrote:
> 
> Hello,
> 
> I could not find a PEP for __dir__. I was thinking today that if __dir__ was 
> added, I would find it useful if modules implemented it by returning __all__ 
> (when __all__ is defined). Or even better, to return the same names that would 
> be imported by a star-import (so, if __all__ is not defined, all names which 
> do not start with '_').
> 
> This wouldn't prevent introspection tools to use mod.__dict__ to still access 
> the module's global dictionary, of course. But it would allow module's authors 
> to more clearly document the module's public API.
> -- 
> Giovanni Bajo
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/jcarlson%40uci.edu

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