1 2 3 4 5 6 7 8 9 10
from overload_subtype import * f = Foo() b = Bar() if spam(f) != 1: raise RuntimeError("foo") if spam(b) != 2: raise RuntimeError("bar")