The dir() built-in does not show the __name__ attribute of a class:
>>> '__name__' in Foo.__dict__
False
>>> Foo.__name__
'Foo'
I implementd my custom __dir__, but the dir() built-in do not want to
call it:
>>> class Foo:
... @classmethod
... def __dir__(cls):
... return ['python']
...
>>> Foo.__dir__()
['python']
>>> dir(Foo)
['__class__', '__delattr__', '__dict__', ...]
Can someone tell me where is the problem? Thanks a lot in advance
--
Jennie
--
http://mail.python.org/mailman/listinfo/python-list