1.1 --- a/tests/methods.py Mon Jun 15 00:40:25 2009 +0200
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,44 +0,0 @@
1.4 -#!/usr/bin/env python
1.5 -
1.6 -class B:
1.7 - def f(self):
1.8 - pass
1.9 -
1.10 -def f(self):
1.11 - pass
1.12 -
1.13 -b = B()
1.14 -
1.15 - # on A on a
1.16 -class A:
1.17 - f1 = f # unbound (A) bound (a)
1.18 - f2 = B.f # unbound (B) unbound (B)
1.19 - f3 = b.f # bound (b) bound (b)
1.20 -
1.21 - def __init__(self):
1.22 - self.f4 = f # N/A function
1.23 - self.f5 = B.f # N/A unbound (B)
1.24 - self.f6 = b.f # N/A bound (b)
1.25 -
1.26 - def m(self):
1.27 - x = self.f1 # should use optimised attribute access
1.28 - x = self.f2
1.29 - x = self.f3
1.30 - x = self.f4
1.31 - x = self.f5
1.32 - x = self.f6
1.33 -
1.34 -a = A()
1.35 -a.m()
1.36 -
1.37 -A.f1
1.38 -A.f2
1.39 -A.f3
1.40 -a.f1
1.41 -a.f2
1.42 -a.f3
1.43 -a.f4
1.44 -a.f5
1.45 -a.f6
1.46 -
1.47 -# vim: tabstop=4 expandtab shiftwidth=4