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/2005-August/055485.html below:

[Python-Dev] SWIG and rlcompleter

[Python-Dev] SWIG and rlcompleter [Python-Dev] SWIG and rlcompleterGuido van Rossum gvanrossum at gmail.com
Wed Aug 17 21:30:33 CEST 2005
> [Timothy Fitz]
> > It seems to
> > me that those who want dir to reflect __dict__ should just use
> > __dict__ in the first place.

[Raymond]
> The dir() builtin does quite a bit more than obj.__dict__.keys().

Well that's the whole point, right? We shouldn't conflate the two. I
don't see this as an argument why it would be bad to delete
non-string-keys found in __dict__ from dir()'s return value. I don't
think that the equation

    set(x.__dict__) <= set(dir(x))

provides enough value to try and keep it. A more useful relationship is

    name in dir(x) <==> getattr(x, name) is valid

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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