fork(1) download
  1. class Yoba:
  2. def __init__(self, a):
  3. self._a = a
  4.  
  5. def a(self):
  6. return self._a
  7.  
  8. bolshoi_yoba = Yoba(1)
  9. malyi_yoba = bolshoi_yoba.a
  10.  
  11. print(malyi_yoba())
  12. bolshoi_yoba._a = 10
  13. print(malyi_yoba())
  14.  
  15.  
Success #stdin #stdout 0.03s 9984KB
stdin
Standard input is empty
stdout
Standard output is empty