[New-bugs-announce] [issue13161] problems with help() documentation of __i*__ operators

Eli Bendersky report at bugs.python.org
Wed Oct 12 18:22:23 CEST 2011

New submission from Eli Bendersky <eliben at gmail.com>:

Report from Joao Carneiro in the docs@ maillist:


I would like to report that I found a mistake in the document of "help(set)".

In the document all the __i*__ methods are described exactly like the same methods without i before the name.

Copied from the document:

    x.__ixor__(y) <==> x^y


    x.__xor__(y) <==> x^y

I suppose that the __ixor__ would mean x^=y and not x^y like the __xor__ method right?

This problem also occurs for:


The report is on Python 3.2, but the problem also exists in 2.7

It appears that the problem's source is in Objects/typeobject.c, where the __i*__ operators are defined with the IBSLOT macro. The documentation string is the operator, passed to IBSLOT - for __ixor__ it's "^", while it should probably be "^="

assignee: docs at python
components: Documentation
messages: 145411
nosy: docs at python, eli.bendersky
priority: normal
severity: normal
status: open
title: problems with help() documentation of __i*__ operators
versions: Python 2.7, Python 3.2, Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list