-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
In the documentation, in the description of __iadd__()
and other similar methods implementing the augmented arithmetic assignments (+=, -=, *=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=), the following contradiction (as it seems to me) occurs:
- "These methods should attempt to do the operation in-place (modifying self)"
- "For instance, if x is an instance of a class with an
__iadd__()
method,x += y
is equivalent tox = x.__iadd__(y)
"
As far as I understand, if __iadd__()
method attempts to do the operation "in-place (modifying self)", then “x =
” at the beginning of this statement:
x = x.__iadd__(y)
… is redundant.
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Todo