1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/attributes_class_assignment_method.py Mon May 09 00:56:35 2011 +0200
1.3 @@ -0,0 +1,23 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +class C:
1.7 + def clsattr(self):
1.8 + return 123
1.9 + def clsattr2(self):
1.10 + return 456
1.11 +
1.12 +def a(x):
1.13 + return 789
1.14 +
1.15 +def b(x):
1.16 + return 234
1.17 +
1.18 +C.clsattr = a
1.19 +C.clsattr2 = b
1.20 +
1.21 +c = C()
1.22 +
1.23 +result_789 = c.clsattr()
1.24 +result_234 = c.clsattr2()
1.25 +
1.26 +# vim: tabstop=4 expandtab shiftwidth=4