Re: [Python-Dev] __dir__, part 2

2006-11-11 Thread Nick Coghlan
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()

Re: [Python-Dev] __dir__, part 2

2006-11-11 Thread Georg Brandl
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()

Re: [Python-Dev] __dir__, part 2

2006-11-11 Thread Georg Brandl
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