1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/attributes_class_bind_function_inherited_via_self.py Sun May 24 19:03:03 2009 +0200
1.3 @@ -0,0 +1,19 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +def e(self, x):
1.7 + return x
1.8 +
1.9 +class C:
1.10 + e = e
1.11 +
1.12 +class E(C):
1.13 + # e = C.e (via inheritance)
1.14 +
1.15 + def f(self):
1.16 + return self.e
1.17 +
1.18 +e = E()
1.19 +r = e.f() # bound E.e
1.20 +result = r(321)
1.21 +
1.22 +# vim: tabstop=4 expandtab shiftwidth=4