class A: def __init__(self, f): A.f = f def g(*args): print(args) A(print).f(1, 2, 3)A(print).g(1, 2, 3)A.g(1, 2, 3)
Standard input is empty
1 2 3 (<__main__.A object at 0xb74b5c6c>, 1, 2, 3) (1, 2, 3)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!