1.1 --- a/tests/attributes2.py Sun May 24 18:12:07 2009 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,31 +0,0 @@
1.4 -#!/usr/bin/env python
1.5 -
1.6 -def e(x): pass
1.7 -
1.8 -class C:
1.9 - e = e
1.10 -
1.11 - def test(self):
1.12 - self.e()
1.13 -
1.14 -class D:
1.15 - e = C.e
1.16 -
1.17 - def test(self):
1.18 - self.e(1) # TypeError: unbound C.e needs C instance, not int
1.19 -
1.20 -class E(C):
1.21 - # e = C.e (via inheritance)
1.22 -
1.23 - def test(self):
1.24 - self.e()
1.25 -
1.26 -c = C()
1.27 -d = D()
1.28 -e = E()
1.29 -
1.30 -p = c.e # bound C.e
1.31 -q = d.e # unbound C.e
1.32 -r = e.e # bound E.e
1.33 -
1.34 -# vim: tabstop=4 expandtab shiftwidth=4