F
fdb
Hi all,
I need to extend and not replace the __getitem__ method of a dict class.
Here is sample the code:
.... def __getitem__(self, y):
.... print("Doing something")
.... dict.__getitem__(self, y)
....
As you see i get None instead of 1.
Any solutions?
Bye
I need to extend and not replace the __getitem__ method of a dict class.
Here is sample the code:
.... def __getitem__(self, y):
.... print("Doing something")
.... dict.__getitem__(self, y)
....
Nonea=myDict()
a["value"] = 1
print a["value"]
As you see i get None instead of 1.
Any solutions?
Bye