tests/attributes_class_rebind_ambiguous.py | raw changeset files shortlog |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tests/attributes_class_rebind_ambiguous.py Mon Jun 04 01:03:02 2012 +0200 1.3 @@ -0,0 +1,17 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +class C: 1.7 + e = 123 1.8 + 1.9 +class F: 1.10 + def __init__(self): 1.11 + self.e = 789 1.12 + 1.13 +def f(obj): 1.14 + obj.e = 456 # should rebind C.e 1.15 + 1.16 +other = F() 1.17 +f(C) 1.18 +result_456 = C.e 1.19 + 1.20 +# vim: tabstop=4 expandtab shiftwidth=4