bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)

(cherry picked from commit fd4cafd470)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2020-09-07 09:30:21 -07:00 committed by GitHub
parent c73ee5acc9
commit 1671b0e4e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 2 deletions

View file

@ -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):