15 Jun
2017
15 Jun
'17
12:38 a.m.
On 06/14/2017 01:54 PM, Barry Scott wrote:
super().__dir__ looks at the class above me that is typically object() and so is not useful as it does not list the member function from my class or __mro__ or other stuff I may not be aware of that is important to return.
__dir__ should return whatever you think is interesting about your object. It does not have to return everything, and in fact makes no guarantees that it will return everything. Enum's __dir__, for example, only returns a handful of entries. -- ~Ethan~