Properties relevant to finding what class supplies a method
For my own future reference if nothing else, here's some properties relevant to finding what superclass supplies a method:
super() objects, we have:
||the object you are calling
||the actual class of said object; equivalent
||the class that
(Because the MRO varies by class, you need both the real class of the object and the current class.)
Unbound methods from Python classes show up as type 'unbound method'
repr(), and have an
im_class attribute that points to their
class (and an
im_func attribute that points to the actual Python
Some methods from builtin classes, such as
object.__init__, show up
as type 'slot wrapper'. These have an
__objclass__ attribute that
points to their class.
Other methods from builtin classes, such as
up as type 'built-in method'. These have a
that points to their class.
Fortunately you can tell the three types of objects apart based on what attribute they have, because nothing has more than one of them (so far; this is where I start to think that this is fishing in the implementation defined waters).