Message145411
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 "^=" |
|
Date |
User |
Action |
Args |
2011-10-12 16:22:23 | eli.bendersky | set | recipients:
+ eli.bendersky, docs@python |
2011-10-12 16:22:23 | eli.bendersky | set | messageid: <1318436543.45.0.46958950416.issue13161@psf.upfronthosting.co.za> |
2011-10-12 16:22:22 | eli.bendersky | link | issue13161 messages |
2011-10-12 16:22:22 | eli.bendersky | create | |
|