[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-05 Thread Brett Cannon
Change by Brett Cannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-05 Thread miss-islington
miss-islington added the comment: New changeset 4aad1e5770fab72908f922a7876075d3d5a7c0d0 by Miss Skeleton (bot) in branch '3.9': bpo-41584: clarify when the reflected method of a binary arithemtic operator is called (GH-22505) https://github.com/python/cpython/commit/4aad1e5770fab72908f922a7

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-05 Thread miss-islington
miss-islington added the comment: New changeset 31ceccb2c77854893f3a754aca04bedd74bedb10 by Miss Skeleton (bot) in branch '3.8': bpo-41584: clarify when the reflected method of a binary arithemtic operator is called (GH-22505) https://github.com/python/cpython/commit/31ceccb2c77854893f3a754a

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +21565 pull_request: https://github.com/python/cpython/pull/22569 ___ Python tracker ___ __

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-05 Thread Brett Cannon
Brett Cannon added the comment: New changeset d02d824e05e2cb86f4df381be18832e76e2c475f by Brett Cannon in branch 'master': bpo-41584: clarify when the reflected method of a binary arithemtic operator is called (#22505) https://github.com/python/cpython/commit/d02d824e05e2cb86f4df381be18832e7

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21564 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/22568 ___ Python tracker

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-02 Thread Brett Cannon
Change by Brett Cannon : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-10-02 Thread Brett Cannon
Change by Brett Cannon : -- keywords: +patch pull_requests: +21516 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22505 ___ Python tracker

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-19 Thread Brett Cannon
Brett Cannon added the comment: Right, there is a `lhs.__rsub__ is not rhs.__rsub__` check which needs to be clearly communicated in that note. -- ___ Python tracker ___

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-19 Thread Vedran Čačić
Vedran Čačić added the comment: Sorry, of course I meant C()-A(). The point is that the class A _doesn't_ have to implement __rsub__. -- ___ Python tracker ___ ___

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-19 Thread Vedran Čačić
Vedran Čačić added the comment: Yes, there is a corner case here. If A derives from B and B derives from C, A doesn't implement __rsub__ and B does, A()-C() will call B's __rsub__. -- nosy: +veky ___ Python tracker

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-19 Thread Eric Wieser
Change by Eric Wieser : -- nosy: +Eric Wieser ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-18 Thread Brett Cannon
Brett Cannon added the comment: Or to be more clear, the RHS subclass must provide a **different** implementation of the method than the LHS. -- ___ Python tracker ___ __

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-18 Thread Brett Cannon
Change by Brett Cannon : -- assignee: docs@python -> brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue41584] Clarify documentation for binary arithmetic operation subclass __r*__ precedence

2020-08-18 Thread Brett Cannon
New submission from Brett Cannon : https://docs.python.org/3/reference/datamodel.html#object.__ror__ has a note saying: "If the right operand's type is a subclass of the left operand's type and that subclass provides the reflected method for the operation, this method will be called before t