[docs] Document that tp_setattro and tp_setattr are used for deleting attributes (issue 25701)
victor.stinner at gmail.com
victor.stinner at gmail.com
Wed Nov 25 04:54:34 EST 2015
http://bugs.python.org/review/25701/diff/16034/Doc/c-api/object.rst
File Doc/c-api/object.rst (right):
http://bugs.python.org/review/25701/diff/16034/Doc/c-api/object.rst#newcode72
Doc/c-api/object.rst:72: otherwise set it to *v* (``o.attr_name = v``).
Returns ``-1`` on failure.
I know that it's not a common Python doc, but I prefer to explicitly say
that an exception is raised in case of error. I suggest:
Raise an exception and returns -1 on failure, return 0 on success.
(Same change for other functions below)
http://bugs.python.org/review/25701/diff/16034/Include/abstract.h
File Include/abstract.h (right):
http://bugs.python.org/review/25701/diff/16034/Include/abstract.h#newcode196
Include/abstract.h:196: (o.attr_name=v). Returns -1 on failure.
Raise an exception and returns -1 on failure, return 0 on success.
http://bugs.python.org/review/25701/
More information about the docs
mailing list