aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/turtle.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Lib/turtle.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/turtle.py')
-rw-r--r--contrib/tools/python3/src/Lib/turtle.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/contrib/tools/python3/src/Lib/turtle.py b/contrib/tools/python3/src/Lib/turtle.py
index 975d851b9f..9c8f6ced25 100644
--- a/contrib/tools/python3/src/Lib/turtle.py
+++ b/contrib/tools/python3/src/Lib/turtle.py
@@ -38,7 +38,7 @@ pictures can easily be drawn.
----- turtle.py
This module is an extended reimplementation of turtle.py from the
-Python standard distribution up to Python 2.5. (See: https://www.python.org)
+Python standard distribution up to Python 2.5. (See: https://www.python.org)
It tries to keep the merits of turtle.py and to be (nearly) 100%
compatible with it. This means in the first place to enable the
@@ -258,7 +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
+ return NotImplemented
def __sub__(self, other):
return Vec2D(self[0]-other[0], self[1]-other[1])
def __neg__(self):
@@ -464,18 +464,18 @@ class TurtleScreenBase(object):
a corresponding TurtleScreenBase class has to be implemented.
"""
- def _blankimage(self):
+ def _blankimage(self):
"""return a blank image object
"""
- img = TK.PhotoImage(width=1, height=1, master=self.cv)
+ img = TK.PhotoImage(width=1, height=1, master=self.cv)
img.blank()
return img
- def _image(self, filename):
+ def _image(self, filename):
"""return an image object containing the
imagedata from a gif-file named filename.
"""
- return TK.PhotoImage(file=filename, master=self.cv)
+ return TK.PhotoImage(file=filename, master=self.cv)
def __init__(self, cv):
self.cv = cv
@@ -809,7 +809,7 @@ class TurtleScreenBase(object):
>>> screen.mainloop()
"""
- self.cv.tk.mainloop()
+ self.cv.tk.mainloop()
def textinput(self, title, prompt):
"""Pop up a dialog window for input of a string.
@@ -824,7 +824,7 @@ class TurtleScreenBase(object):
>>> screen.textinput("NIM", "Name of first player:")
"""
- return simpledialog.askstring(title, prompt, parent=self.cv)
+ return simpledialog.askstring(title, prompt, parent=self.cv)
def numinput(self, title, prompt, default=None, minval=None, maxval=None):
"""Pop up a dialog window for input of a number.
@@ -832,7 +832,7 @@ class TurtleScreenBase(object):
Arguments: title is the title of the dialog window,
prompt is a text mostly describing what numerical information to input.
default: default value
- minval: minimum value for input
+ minval: minimum value for input
maxval: maximum value for input
The number input must be in the range minval .. maxval if these are
@@ -845,8 +845,8 @@ class TurtleScreenBase(object):
"""
return simpledialog.askfloat(title, prompt, initialvalue=default,
- minvalue=minval, maxvalue=maxval,
- parent=self.cv)
+ minvalue=minval, maxvalue=maxval,
+ parent=self.cv)
##############################################################################
@@ -964,8 +964,8 @@ class TurtleScreen(TurtleScreenBase):
def __init__(self, cv, mode=_CFG["mode"],
colormode=_CFG["colormode"], delay=_CFG["delay"]):
- TurtleScreenBase.__init__(self, cv)
-
+ TurtleScreenBase.__init__(self, cv)
+
self._shapes = {
"arrow" : Shape("polygon", ((-10,0), (10,0), (0,10))),
"turtle" : Shape("polygon", ((0,16), (-2,14), (-1,10), (-4,7),
@@ -1569,7 +1569,7 @@ class TNavigator(object):
fullcircle - a number
Set angle measurement units, i. e. set number
- of 'degrees' for a full circle. Default value is
+ of 'degrees' for a full circle. Default value is
360 degrees.
Example (for a Turtle instance named turtle):
@@ -1645,7 +1645,7 @@ class TNavigator(object):
Argument:
distance -- a number
- Move the turtle backward by distance, opposite to the direction the
+ Move the turtle backward by distance, opposite to the direction the
turtle is headed. Do not change the turtle's heading.
Example (for a Turtle instance named turtle):
@@ -2877,8 +2877,8 @@ class RawTurtle(TPen, TNavigator):
between the orientation of the turtleshape and the heading of the
turtle (its direction of movement).
- (Incorrectly marked as deprecated since Python 3.1, it is really
- settiltangle that is deprecated.)
+ (Incorrectly marked as deprecated since Python 3.1, it is really
+ settiltangle that is deprecated.)
Examples (for a Turtle instance named turtle):
>>> turtle.shape("circle")