fork download
  1. class A:
  2. def __init__(self, f):
  3. A.f = f
  4.  
  5. def g(*args):
  6. print(args)
  7.  
  8. A(print).f(1, 2, 3)
  9. A(print).g(1, 2, 3)
  10. A.g(1, 2, 3)
Success #stdin #stdout 0.02s 8736KB
stdin
Standard input is empty
stdout
1 2 3
(<__main__.A object at 0xb74b5c6c>, 1, 2, 3)
(1, 2, 3)