Fredrik Lundh wrote:
> Guido van Rossum wrote:
>
>> No objection on targetting 2.6 if other developers agree. Seems this
>> is well under way. good work!
>
> given that dir() is used extensively by introspection tools, I'm
> not sure I'm positive to a __dir__ that *overrides* the standard
> dir()
Fredrik Lundh wrote:
> Guido van Rossum wrote:
>
>> No objection on targetting 2.6 if other developers agree. Seems this
>> is well under way. good work!
>
> given that dir() is used extensively by introspection tools, I'm
> not sure I'm positive to a __dir__ that *overrides* the standard
> dir()
Guido van Rossum wrote:
>> (what about vars(), btw?)
>
> Interesting question! Right now vars() and dir() don't seem to use the
> same set of keys; e.g.:
>
class C: pass
> ...
c = C()
c.foo = 42
vars(c)
> {'foo': 42}
dir(c)
> ['__doc__', '__module__', 'foo']
>
> It