Why does this code raise RecursionError on line 11?
def my_class_decorator(cls):
class DoNothing(cls):
pass
return DoNothing
@my_class_decorator
class Echo:
def __init__(self):
super(Echo, self).__init__()
print("hello world")
Echo()
I got the following error:
RecursionError: maximum recursion depth exceeded while calling a Python object