tests/attributes_instance_uncertain.py | raw changeset files shortlog |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tests/attributes_instance_uncertain.py Sun May 01 00:37:51 2011 +0200 1.3 @@ -0,0 +1,17 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +class C: 1.7 + x = 1 1.8 + 1.9 +class D: 1.10 + x = 2 1.11 + 1.12 +def f(c): 1.13 + return c.x 1.14 + 1.15 +c = C() 1.16 +d = D() 1.17 +result_1 = f(c) 1.18 +result_2 = f(d) 1.19 + 1.20 +# vim: tabstop=4 expandtab shiftwidth=4