aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib-python/2.7/lib-tk/turtle.py')
-rw-r--r--lib-python/2.7/lib-tk/turtle.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib-python/2.7/lib-tk/turtle.py b/lib-python/2.7/lib-tk/turtle.py
index 264318effc..ae921ce2e5 100644
--- a/lib-python/2.7/lib-tk/turtle.py
+++ b/lib-python/2.7/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])
@@ -1300,7 +1300,7 @@ class TurtleScreen(TurtleScreenBase):
Arguments:
fun -- a function with two arguments, the coordinates of the
clicked point on the canvas.
- num -- the number of the mouse-button, defaults to 1
+ btn -- the number of the mouse-button, defaults to 1
Example (for a TurtleScreen instance named screen
and a Turtle instance named turtle):
@@ -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:
@@ -3418,7 +3418,7 @@ class RawTurtle(TPen, TNavigator):
Arguments:
fun -- a function with two arguments, to which will be assigned
the coordinates of the clicked point on the canvas.
- num -- number of the mouse-button defaults to 1 (left mouse button).
+ btn -- number of the mouse-button defaults to 1 (left mouse button).
add -- True or False. If True, new binding will be added, otherwise
it will replace a former binding.
@@ -3439,7 +3439,7 @@ class RawTurtle(TPen, TNavigator):
Arguments:
fun -- a function with two arguments, to which will be assigned
the coordinates of the clicked point on the canvas.
- num -- number of the mouse-button defaults to 1 (left mouse button).
+ btn -- number of the mouse-button defaults to 1 (left mouse button).
Example (for a MyTurtle instance named joe):
>>> class MyTurtle(Turtle):
@@ -3464,7 +3464,7 @@ class RawTurtle(TPen, TNavigator):
Arguments:
fun -- a function with two arguments, to which will be assigned
the coordinates of the clicked point on the canvas.
- num -- number of the mouse-button defaults to 1 (left mouse button).
+ btn -- number of the mouse-button defaults to 1 (left mouse button).
Every sequence of mouse-move-events on a turtle is preceded by a
mouse-click event on that turtle.