fork download
  1. class C:
  2. def __init__(self, c):
  3. self.c = c
  4. def __call__(self, a, b):
  5. a *= 2
  6. b *= 4
  7. self.c *= 8
  8. return a + b + self.c
  9.  
  10. A = C(1)
  11. print A(1, 1), A.c
  12. print A(1, 1), A.c
Success #stdin #stdout 0.03s 6356KB
stdin
Standard input is empty
stdout
14 8
70 64