inheriting from C types

Tim Peters tim.one at comcast.net
Wed Jul 17 00:02:32 EDT 2002


[Martin v. Loewis, out of context]
> What is k.__mro__?

[Greg Ewing]
> I believe it stands for Method Resolution Order, and
> it contains a flattened list of all the base classes,
> in the order they should be searched for methods.

All correct, except that it also contains the class itself first (unless you
create a really weird custom metatype that defines a bizarre resolution
order for its instances).  But Martin knows that.  In context, if we knew
the *value* of k.__mro__, that would help in answering the OP's question.






More information about the Python-list mailing list