tests/class_function_assignment_using_target.py | raw changeset files shortlog |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tests/class_function_assignment_using_target.py Sun Jun 19 02:07:58 2011 +0200 1.3 @@ -0,0 +1,16 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +def f(self, x): 1.7 + return 2 1.8 + 1.9 +class C: 1.10 + def g(self, x): 1.11 + return 1 1.12 + h = f 1.13 + 1.14 +c = C() 1.15 +result_1 = c.g(123) 1.16 +result_2 = c.h(123) 1.17 +#result_2 = f(123, 456) 1.18 + 1.19 +# vim: tabstop=4 expandtab shiftwidth=4