This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Wrong signature for richcmpfunc in documentation
Type: Stage: resolved
Components: Documentation Versions: Python 3.3, Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: asvetlov, docs@python, muellner, python-dev
Priority: normal Keywords:

Created on 2013-04-10 16:22 by muellner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg186513 - (view) Author: Daniel Müllner (muellner) Date: 2013-04-10 16:22
The C API documentation has a code snippet with a sample implementation of a rich comparison function here:

http://docs.python.org/3.3/extending/newtypes.html#object-comparison

The function is declared as

static int
newdatatype_richcmp(PyObject *obj1, PyObject *obj2, int op)

but I believe that it should be

static PyObject *
newdatatype_richcmp(PyObject *obj1, PyObject *obj2, int op)
msg186621 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-04-12 13:09
New changeset a263d40d1724 by Andrew Svetlov in branch '3.3':
#17688: fix declaration for richcmp example in the docs.
http://hg.python.org/cpython/rev/a263d40d1724

New changeset 4c996682d086 by Andrew Svetlov in branch 'default':
#17688: fix declaration for richcmp example in the docs.
http://hg.python.org/cpython/rev/4c996682d086
msg186622 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2013-04-12 13:10
Fixed. Thanks.
History
Date User Action Args
2022-04-11 14:57:44adminsetgithub: 61888
2013-04-12 13:10:01asvetlovsetstatus: open -> closed

versions: + Python 3.4
nosy: + asvetlov

messages: + msg186622
resolution: fixed
stage: resolved
2013-04-12 13:09:31python-devsetnosy: + python-dev
messages: + msg186621
2013-04-10 16:22:19muellnercreate