summaryrefslogtreecommitdiff
path: root/Lib/lib-tk/turtle.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-tk/turtle.py')
-rw-r--r--Lib/lib-tk/turtle.py25
1 files changed, 14 insertions, 11 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py
index 767012020c..a003433273 100644
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -335,10 +335,10 @@ def __forwardmethods(fromClass, toClass, toPart, exclude = ()):
if ex[:1] == '_' or ex[-1:] == '_':
del _dict[ex]
for ex in exclude:
- if _dict.has_key(ex):
+ if ex in _dict:
del _dict[ex]
for ex in __methods(fromClass):
- if _dict.has_key(ex):
+ if ex in _dict:
del _dict[ex]
for method, func in _dict.items():
@@ -1385,7 +1385,7 @@ class TurtleScreen(TurtleScreenBase):
Optional argument:
picname -- a string, name of a gif-file or "nopic".
- If picname is a filename, set the corresponing image as background.
+ If picname is a filename, set the corresponding image as background.
If picname is "nopic", delete backgroundimage, if present.
If picname is None, return the filename of the current backgroundimage.
@@ -1409,7 +1409,7 @@ class TurtleScreen(TurtleScreenBase):
Optional arguments:
canvwidth -- positive integer, new width of canvas in pixels
canvheight -- positive integer, new height of canvas in pixels
- bg -- colorstring or color-tupel, new backgroundcolor
+ bg -- colorstring or color-tuple, new backgroundcolor
If no arguments are given, return current (canvaswidth, canvasheight)
Do not alter the drawing window. To observe hidden parts of
@@ -1495,7 +1495,10 @@ class TNavigator(object):
>>> turtle.left(90)
>>> turtle.heading()
90
- >>> turtle.degrees(400.0) # angle measurement in gon
+
+ Change angle measurement unit to grad (also known as gon,
+ grade, or gradian and equals 1/100-th of the right angle.)
+ >>> turtle.degrees(400.0)
>>> turtle.heading()
100
@@ -3076,9 +3079,9 @@ class RawTurtle(TPen, TNavigator):
fill="", width=ps)
# Turtle now at position old,
self._position = old
- ## if undo is done during crating a polygon, the last vertex
- ## will be deleted. if the polygon is entirel deleted,
- ## creatigPoly will be set to False.
+ ## if undo is done during creating a polygon, the last vertex
+ ## will be deleted. if the polygon is entirely deleted,
+ ## creatingPoly will be set to False.
## Polygons created before the last one will not be affected by undo()
if self._creatingPoly:
if len(self._poly) > 0:
@@ -3218,7 +3221,7 @@ class RawTurtle(TPen, TNavigator):
def dot(self, size=None, *color):
"""Draw a dot with diameter size, using color.
- Optional argumentS:
+ Optional arguments:
size -- an integer >= 1 (if given)
color -- a colorstring or a numeric color tuple
@@ -3688,7 +3691,7 @@ class _Screen(TurtleScreen):
class Turtle(RawTurtle):
- """RawTurtle auto-crating (scrolled) canvas.
+ """RawTurtle auto-creating (scrolled) canvas.
When a Turtle object is created or a function derived from some
Turtle method is called a TurtleScreen object is automatically created.
@@ -3728,7 +3731,7 @@ def write_docstringdict(filename="turtle_docstringdict"):
filename -- a string, used as filename
default value is turtle_docstringdict
- Has to be called explicitely, (not used by the turtle-graphics classes)
+ Has to be called explicitly, (not used by the turtle-graphics classes)
The docstring dictionary will be written to the Python script <filname>.py
It is intended to serve as a template for translation of the docstrings
into different languages.