[docs] [issue25701] Document that tp_setattro and tp_setattr are used for deleting attributes

Serhiy Storchaka report at bugs.python.org
Tue Nov 24 13:55:28 EST 2015


Serhiy Storchaka added the comment:

Thank you Martin. In general the patch LGTM, but I'm not expert in English writing.

There are other functions and slots with twofold purpose: PyObject_SetItem, PySequence_SetItem, PySequence_SetSlice, PyMapping_SetItemString, PySequenceMethods.sq_ass_item, PyMappingMethods.mp_ass_subscript. May be address them in this issue?

I'm not sure about documenting the deletion for PyObject_SetAttr and like. All these functions have Del-counterpart. Deleting by Set-function with NULL may be a side effect and be deprecated in future. May be worth to discuss this on Python-Dev.

For PySys_SetObject the deletion if value is NULL already is documented, but there is no PySys_DelObject.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25701>
_______________________________________


More information about the docs mailing list