for example i use this code:
class A(object):
def __init__(self):
self.dict1 = {
'A': 3,
'B': self.A}
def __getattr__(self, key):
if key in self.dict1:
return self.dict1[key]
a = A()
and when it's runned it throws maximum recursion depth exceeded. Can someone please tell me what am i doing wrong here