micropython

Annotated tests/instance_initialisation_parameters.py

605:0bcb66c8b6e2
2012-07-15 Paul Boddie Show only distinct attribute name lists when showing attribute usage for names.
paul@243 1
#!/usr/bin/env python
paul@243 2
paul@243 3
class E:
paul@243 4
    def __init__(self, x):
paul@243 5
        self.x = x
paul@243 6
paul@243 7
class F:
paul@243 8
    def __init__(self, x=3):
paul@243 9
        self.x = x
paul@243 10
paul@243 11
e = E(1)
paul@243 12
f = F()
paul@243 13
g = F(2)
paul@243 14
X = F
paul@243 15
x = X()
paul@243 16
paul@243 17
result_1 = e.x
paul@243 18
result1_3 = f.x
paul@243 19
result_2 = g.x
paul@243 20
result2_3 = x.x
paul@243 21
paul@243 22
# vim: tabstop=4 expandtab shiftwidth=4