for argb in args:
    if head in argb[1:]:
        break
else:
    newargs = tuple(argb if len(argb) > 0 and argb[0] != head else argb[1:] for
        argb in args)
print('mro_merge(%s) = %s + mro_merge(%s)' % (args, head, newargs))
yield head
for x in mro_merge(*newargs):
    yield x
break
Python MRO order