Python: the __getattribute__ method and descriptors
according to this guide on python descriptors https://docs.python.org/2/howto/descriptor.html method objects in new style classes are implemented using descriptors in order to avoid special casing them in attribute lookup. the way I understand this is that there is a method object type that implements __get__ and returns a bound method object when called with an instance and an unbound method object when called with no instance and only a class. the article also states that this logic is implemented in the object.__getattribute__ method. like so: def __getattribute__(self, key): "Emulate type