simplify

Annotated tests/class.py

279:504dc5d62374
2007-09-06 Paul Boddie Added a fully-qualified name method for WithName-derived classes, producing a more usable global name for applications such as the viewer. Added a method for returning "visible" class attributes to GeneralClass. Added an attribute table production function for integration with the explicit distribution, along with a test program option for generating such a table.
paulb@14 1
class A:
paulb@82 2
    "A class with attribute and method."
paulb@222 3
    x = 123.456
paulb@223 4
    x2 = x
paulb@223 5
paulb@14 6
    def m(self, x):
paulb@14 7
        self.x = x
paulb@223 8
paulb@223 9
    def n(self, y=A.x):
paulb@188 10
        self.y = y
paulb@223 11
    n2 = n
paulb@188 12
paulb@174 13
a1 = A()
paulb@174 14
a2 = A()
paulb@23 15
y = A.x
paulb@174 16
a1.m(321)
paulb@174 17
a2.m("321")
paulb@174 18
z1 = a1.x
paulb@174 19
z2 = a2.x
paulb@188 20
a1.n(123)
paulb@188 21
a2.n("123")
paulb@188 22
a2.n()