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