fork(1) download
  1. class Class(object):
  2. def __init__(self, arg):
  3. self.y = lambda: arg + 5
  4. def output(self):
  5. print(self.y())
  6.  
  7.  
  8. x = 5
  9.  
  10. c = Class(x)
  11. c.output()
  12.  
  13. x = 10
  14.  
  15. c.output()
Success #stdin #stdout 0.03s 9440KB
stdin
Standard input is empty
stdout
10
10