[docs] Document that tp_setattro and tp_setattr are used for deleting attributes (issue 25701)

vadmium+py at gmail.com vadmium+py at gmail.com
Tue Dec 1 23:19:25 EST 2015


http://bugs.python.org/review/25701/diff/16071/Doc/c-api/object.rst
File Doc/c-api/object.rst (right):

http://bugs.python.org/review/25701/diff/16071/Doc/c-api/object.rst#newcode71
Doc/c-api/object.rst:71: object *o*.  If *v* is *NULL*, delete the value
(``del o.attr_name``),
On 2015/12/01 16:50:59, storchaka wrote:
> May be refer to PyObject_DelAttr if v is NULL?

Good idea (if we decide not to deprecate this)

http://bugs.python.org/review/25701/diff/16071/Doc/c-api/object.rst#newcode72
Doc/c-api/object.rst:72: otherwise set it to *v* (``o.attr_name = v``).
Raises an exception and
On 2015/12/01 16:50:59, storchaka wrote:
> It looks to me that "Return" and "Raise" are more preferable to
"Returns" and
> "Raises" in the documentation.

Agreed. I was keeping the mood the same as the original, but now I see
it would be better to agree with the first two sentences.

http://bugs.python.org/review/25701/


More information about the docs mailing list