[Python-Dev] PyDict_Get/SetItem and dict subclasses
Victor Stinner
victor.stinner at haypocalc.com
Sat Nov 5 17:21:09 CET 2011
More information about the Python-Dev mailing list
Sat Nov 5 17:21:09 CET 2011
- Previous message: [Python-Dev] Packaging and binary distributions
- Next message: [Python-Dev] PyDict_Get/SetItem and dict subclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, PyDict_GetItem() and PyDict_SetItem() don't call __getitem__ and __setitem__ for dict subclasses. Is there a reason for that? I found this surprising behaviour when I replaced a dict by a custom dict checking the key type on set. But my __setitem__ was not called because the function using the dict was implemented in C (and I didn't know that ;-)). Victor
- Previous message: [Python-Dev] Packaging and binary distributions
- Next message: [Python-Dev] PyDict_Get/SetItem and dict subclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list