Skip to main content

itermro

Returns an iterator over the method resolution order (MRO) of a class, stopping when a class in the specified stop set is encountered.

def itermro(
cls: type,
stop: container
) - > iterator

Iterates through the method resolution order (MRO) of a class until a specified stop condition is met.

Parameters

NameTypeDescription
clstypeThe class whose method resolution order is to be traversed.
stopcontainerA collection of classes that, when encountered in the MRO, will terminate the iteration.

Returns

TypeDescription
iteratorAn iterator yielding classes in the MRO up to, but not including, the first class found in the stop collection.