micropython

tests/attributes_class_bind_function_via_self_uncertain.py

229:a179262ea7c4
2009-05-29 Paul Boddie Changed RecoverFrame to actually recover the locals as the invocation frame, rather than just discard the locals. Changed AdjustFrame to work on the locals. Switched the order of the above instructions in instantiator functions. Made various tests compatible with the simple testing framework.
     1 #!/usr/bin/env python     2      3 def e(self, x):     4     return x     5      6 class C:     7     e = e     8      9     def f(self):    10         self.m = self.e    11         return self.m # uncertain    12     13 c = C()    14 p = c.f() # bound C.e    15 result_321 = p(321)    16     17 # vim: tabstop=4 expandtab shiftwidth=4