All pastes #761406 Raw Edit

Something

public python v1 · immutable
·published 2007-11-04 21:06 UTC
rendered paste body
class Foo(object):        def __init__(self):                self.__call__ = self.__realcall__        def __realcall__(self):                return 'foo'class Bar(object):        def __init__(self):                self.__call__ = self.__realcall__        def __realcall__(self):                return 'bar'        def __call__(self):                return self.__call__()try:        print 'Foo:'        print Foo()()except:        import traceback        traceback.print_exc()print 'Bar:', Bar()()