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/2008-February/076916.html below:

[Python-Dev] dir() and __all__

[Python-Dev] dir() and __all__Thomas Wouters thomas at python.org
Sat Feb 16 07:39:07 CET 2008
On Sat, Feb 16, 2008 at 4:18 AM, Raymond Hettinger <python at rcn.com> wrote:

> [Raymond]
> >> Should dir(module) use __all__ when defined?
>
> [GvR]
> > It's not consistent with what dir() of a class or instance does though.
> >
> > -1.
>
> Perhaps there is another solution. Have dir() exclude objects
> which are modules.  For example, dir(logging) would exclude
> sys, os, types, time, string, cStringIO, and traceback.


Don't forget that that would mean dir(os) would no longer show 'path'.

-- 
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080216/46934e68/attachment.htm 
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