MinDalle_StableDiff/Python310/Lib/test/good_getattr.py

12 lines
198 B
Python
Raw Permalink Normal View History

2022-09-17 15:26:13 +03:00
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