2007-02-06 | paulb | raw files shortlog changelog graph | Added a test of default parameters. | |
tests/class.py (file) |
1.1 --- a/tests/class.py Tue Feb 06 00:56:25 2007 +0100 1.2 +++ b/tests/class.py Tue Feb 06 00:56:52 2007 +0100 1.3 @@ -3,6 +3,9 @@ 1.4 x = 123 1.5 def m(self, x): 1.6 self.x = x 1.7 + def n(self, y=x): 1.8 + self.y = y 1.9 + 1.10 a1 = A() 1.11 a2 = A() 1.12 y = A.x 1.13 @@ -10,3 +13,6 @@ 1.14 a2.m("321") 1.15 z1 = a1.x 1.16 z2 = a2.x 1.17 +a1.n(123) 1.18 +a2.n("123") 1.19 +a2.n()