classification
Title: Missed "return NotImplemented" in Vec2D.__rmul__
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-09-04 17:41 by serhiy.storchaka, last changed 2020-09-07 16:50 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 22092 merged serhiy.storchaka, 2020-09-04 17:46
PR 22137 merged miss-islington, 2020-09-07 15:55
PR 22138 merged miss-islington, 2020-09-07 15:55
Messages (4)
msg376389 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-09-04 17:41
Vec2D.__rmul__() misses "return NotImplemented" and therefore implicitly returns None for arguments which are not int or float.

>>> import turtle
>>> print(object() * turtle.Vec2D(1, 2))
None
msg376511 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-09-07 15:55
New changeset fd4cafd4700dc03cb05fc2e5263c2666d785d6e3 by Serhiy Storchaka in branch 'master':
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
https://github.com/python/cpython/commit/fd4cafd4700dc03cb05fc2e5263c2666d785d6e3
msg376513 - (view) Author: miss-islington (miss-islington) Date: 2020-09-07 16:28
New changeset ebef6c0b50d94ca7daef6fdb38d043e0183ab7d1 by Miss Islington (bot) in branch '3.8':
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
https://github.com/python/cpython/commit/ebef6c0b50d94ca7daef6fdb38d043e0183ab7d1
msg376514 - (view) Author: miss-islington (miss-islington) Date: 2020-09-07 16:30
New changeset 1671b0e4e00061f23b6677e37e27a4ed44998329 by Miss Islington (bot) in branch '3.9':
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
https://github.com/python/cpython/commit/1671b0e4e00061f23b6677e37e27a4ed44998329
History
Date User Action Args
2020-09-07 16:50:31serhiy.storchakasetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.10, - Python 3.7
2020-09-07 16:30:25miss-islingtonsetmessages: + msg376514
2020-09-07 16:28:08miss-islingtonsetmessages: + msg376513
2020-09-07 15:55:42miss-islingtonsetpull_requests: + pull_request21222
2020-09-07 15:55:35miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request21221
2020-09-07 15:55:29serhiy.storchakasetmessages: + msg376511
2020-09-04 17:46:49serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request21179
2020-09-04 17:41:53serhiy.storchakacreate