[Python-Dev] Deleting with setting C API functions
Serhiy Storchaka
storchaka at gmail.com
Tue Nov 24 16:21:21 EST 2015
More information about the Python-Dev mailing list
Tue Nov 24 16:21:21 EST 2015
- Previous message (by thread): [Python-Dev] [Python-checkins] Daily reference leaks (e5e507a357a6): sum=103
- Next message (by thread): [Python-Dev] Deleting with setting C API functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Slots like PyTypeObject.tp_setattr, PySequenceMethods.sq_ass_item, PyMappingMethods.mp_ass_subscript are used not only for setting attribute/item value, but also for deleting attribute/item (if value is NULL). This is not documented and should be. [1] Correspondingly public API functions like PyObject_SetAttr, PyObject_SetItem, PySequence_SetItem, PySequence_SetSlice, PyMapping_SetItemString can be used for deleting. But all these functions have special counterparts for deleting: PyObject_DelAttr etc. The question is wherever deleting ability of Set-functions is intentional, should we document this or deprecate and then delete? [1] http://bugs.python.org/issue25701
- Previous message (by thread): [Python-Dev] [Python-checkins] Daily reference leaks (e5e507a357a6): sum=103
- Next message (by thread): [Python-Dev] Deleting with setting C API functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list