Mar-06-2022, 10:32 PM
I'm try override dict class for way that compatible with standart dict class. How i can get access to parent dict attribute if i override getitem method?
class CSJSON(dict): def __getitem__(self, Key : str): Key = Key + 'zzz' # sample of key modification for app use return(super()[Key])Then i faced error:
Error:'super' object is not subscriptable.
If i'm use self[Key] - then i get infinite recursive call of getitem.