Lichen

Annotated tests/global_names.py

627:05ad7964265c
2017-02-27 Paul Boddie Merged convenience macro changes.
paul@2 1
class C:
paul@2 2
    x = 3
paul@2 3
paul@2 4
def f():
paul@2 5
    x = g.x
paul@266 6
    print x             # 3
paul@2 7
    y = g
paul@266 8
    print y             # __main__.C
paul@2 9
    return y.x
paul@2 10
paul@266 11
def i():
paul@266 12
    x = h.x
paul@266 13
    y = h
paul@266 14
    return y
paul@266 15
paul@2 16
g = C
paul@2 17
result = f()
paul@266 18
print result            # 3
paul@266 19
paul@266 20
h = C
paul@266 21
print i()               # __main__.C
paul@266 22
print i().x             # 3
paul@266 23
paul@266 24
h = C()
paul@266 25
print i()               # <__main__.C instance>
paul@266 26
print i().x             # 3