Python: dir() gets the names the from __dir__ or __dict__
dir(obj) returns a list of names that is provided by the objectobj. The Python interpreter tries to get this list from the method__dir__(). If this method does not exist, the names correspond the the keys in the member __dict__.