summaryrefslogtreecommitdiffstats
path: root/Lib/turtle.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-09-07 16:30:21 (GMT)
committerGitHub <noreply@github.com>2020-09-07 16:30:21 (GMT)
commit1671b0e4e00061f23b6677e37e27a4ed44998329 (patch)
treede1e4b54fc1ebff84bef1b935e399b996ebeed14 /Lib/turtle.py
parentc73ee5acc96b4bbd6885156883b224b8cc3e470c (diff)
downloadcpython-1671b0e4e00061f23b6677e37e27a4ed44998329.zip
cpython-1671b0e4e00061f23b6677e37e27a4ed44998329.tar.gz
cpython-1671b0e4e00061f23b6677e37e27a4ed44998329.tar.bz2
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
(cherry picked from commit fd4cafd4700dc03cb05fc2e5263c2666d785d6e3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/turtle.py')
-rw-r--r--Lib/turtle.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/turtle.py b/Lib/turtle.py
index ee67a35..ba8288d 100644
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -258,6 +258,7 @@ class Vec2D(tuple):
def __rmul__(self, other):
if isinstance(other, int) or isinstance(other, float):
return Vec2D(self[0]*other, self[1]*other)
+ return NotImplemented
def __sub__(self, other):
return Vec2D(self[0]-other[0], self[1]-other[1])
def __neg__(self):