tests/attributes_class_bind_function.py | raw changeset files shortlog |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tests/attributes_class_bind_function.py Fri May 22 00:17:35 2009 +0200 1.3 @@ -0,0 +1,13 @@ 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 +c = C() 1.13 +p = c.e # bound C.e 1.14 +result = p(321) 1.15 + 1.16 +# vim: tabstop=4 expandtab shiftwidth=4