# HG changeset patch # User paulb@localhost.localdomain # Date 1170719812 -3600 # Node ID 8c7d54b395bcc088c8195072064b08fa82749594 # Parent f883eee9485233a51ef8ce9f2bf56f5f1652a982 Added a test of default parameters. diff -r f883eee94852 -r 8c7d54b395bc tests/class.py --- a/tests/class.py Tue Feb 06 00:56:25 2007 +0100 +++ b/tests/class.py Tue Feb 06 00:56:52 2007 +0100 @@ -3,6 +3,9 @@ x = 123 def m(self, x): self.x = x + def n(self, y=x): + self.y = y + a1 = A() a2 = A() y = A.x @@ -10,3 +13,6 @@ a2.m("321") z1 = a1.x z2 = a2.x +a1.n(123) +a2.n("123") +a2.n()