Staging
v0.8.1
https://github.com/python/cpython
Raw File
Tip revision: 4b37228823fecb73fe70dc009e696a7805b0833f authored by Ethan Furman on 08 December 2020, 22:29:02 UTC
[3.9] [Enum] reformat and add doc strings (GH-23705). (GH-23707)
Tip revision: 4b37228
good_getattr.py
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
back to top