summaryrefslogtreecommitdiffstats
path: root/Lib/test/good_getattr.py
blob: 7d27de6262ad741ea0029ca11b4d07995f08f370 (plain)
1
2
3
4
5
6
7
8
9
10
11
x = 1

def __dir__():
    return ['a', 'b', 'c']

def __getattr__(name):
    if name == "yolo":
        raise AttributeError("Deprecated, use whatever instead")
    return f"There is {name}"

y = 2