diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-27 15:09:36 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-27 15:09:36 +0200 |
commit | 994f04dbf576f4ebafb9de2bc6821e15cb0de0ea (patch) | |
tree | 4967ed9c9688f7fe035c646de993c337141051b0 /Lib/lib-tk/turtle.py | |
parent | 58c2c6ebb893917e759cc1401b0d862b3f7c1a94 (diff) | |
download | cpython-git-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.gz |
Issue #28998: More APIs now support longs as well as ints.
Diffstat (limited to 'Lib/lib-tk/turtle.py')
-rw-r--r-- | Lib/lib-tk/turtle.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py index 264318effc..52e669b482 100644 --- a/Lib/lib-tk/turtle.py +++ b/Lib/lib-tk/turtle.py @@ -276,7 +276,7 @@ class Vec2D(tuple): return self[0]*other[0]+self[1]*other[1] return Vec2D(self[0]*other, self[1]*other) def __rmul__(self, other): - if isinstance(other, int) or isinstance(other, float): + if isinstance(other, (int, long, float)): return Vec2D(self[0]*other, self[1]*other) def __sub__(self, other): return Vec2D(self[0]-other[0], self[1]-other[1]) @@ -2352,7 +2352,7 @@ class TPen(object): self._resizemode = p["resizemode"] if "stretchfactor" in p: sf = p["stretchfactor"] - if isinstance(sf, (int, float)): + if isinstance(sf, (int, long, float)): sf = (sf, sf) self._stretchfactor = sf if "outline" in p: |