2017-02-21 | Paul Boddie | raw annotate files changeset graph | Only copy changed template files and only generate updated program files, removing the "make clean" invocation and permitting incremental builds. Changed constant labelling to employ content digests so that constant names remain stable and do not confuse already-generated code. | method-wrapper-for-context |
1 class C: 2 def f(self): 3 print self 4 return self.value() 5 6 def value(self): 7 return 123 8 9 c = C() 10 11 class D: 12 f = c.f 13 14 d = D() 15 16 print c.f.__name__ # f 17 print c.f() # <__main__.C instance> 18 # 123 19 print d.f.__name__ # wrapper 20 print d.f() # <__main__.C instance> 21 # 123