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.

Author eli.bendersky
Recipients docs@python, eli.bendersky
Date 2011-10-12.16:22:22
SpamBayes Score 2.9571047e-06
Marked as misclassified No
Message-id <1318436543.45.0.46958950416.issue13161@psf.upfronthosting.co.za>
In-reply-to
Content
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:
__ixor__(...)

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


__xor__(...)

    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:
__iand__
__ior__
__isub__

----------------------------

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 "^="
History
Date User Action Args
2011-10-12 16:22:23eli.benderskysetrecipients: + eli.bendersky, docs@python
2011-10-12 16:22:23eli.benderskysetmessageid: <1318436543.45.0.46958950416.issue13161@psf.upfronthosting.co.za>
2011-10-12 16:22:22eli.benderskylinkissue13161 messages
2011-10-12 16:22:22eli.benderskycreate