class A: def __init__(self, f): self.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 0xb7442c8c>, 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!