Only this! I'm going crazy!

Than you!

Code:


class myDict(dict):
    def __getitem__(self, y):
        print("Doing something")
        return dict.__getitem__(self, y)

a=myDict()
a["value"] = 1
print a["value"]


Christian Heimes ha scritto:
> How about returning the value? :]


-- 
FabioBD

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to