New submission from Eli Bendersky <eli...@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:
__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 "^="

----------
assignee: docs@python
components: Documentation
messages: 145411
nosy: docs@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue13161>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to