fork download
  1. class A:
  2. def m(self):
  3. print('hop hei lalalei')
  4.  
  5.  
  6. class Proxy:
  7. def __init__(self, another_class):
  8. self.another_class = another_class
  9.  
  10. def m(self):
  11. print('дополнительные штуки до')
  12. self.another_class.m()
  13. print('дополнительные штуки после')
  14.  
  15. a = A()
  16. p = Proxy(a)
  17.  
  18. p.m()
Success #stdin #stdout 0.02s 9120KB
stdin
Standard input is empty
stdout
дополнительные штуки до
hop hei lalalei
дополнительные штуки после