Skip to content

Commit f3f5085

Browse files
Apply Terry's suggestions.
Co-authored-by: Terry Reedy <tjreedy@udel.edu>
1 parent a723444 commit f3f5085

2 files changed

Lines changed: 3 additions & 42 deletions

File tree

‎Doc/library/turtle.rst‎

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,26 +1171,14 @@ Visibility
11711171
.. function:: hideturtle()
11721172
ht()
11731173

1174-
Make the turtle invisible. It's a good idea to do this while you're in the
1175-
middle of a complex drawing, because hiding the turtle speeds up the drawing
1176-
noticeably.
1177-
1178-
.. doctest::
1179-
:skipif: _tkinter is None
1180-
1181-
>>> turtle.hideturtle()
1174+
Make the turtle invisible. If the pen is down, movement still draws.
11821175

11831176

11841177
.. function:: showturtle()
11851178
st()
11861179

11871180
Make the turtle visible.
11881181

1189-
.. doctest::
1190-
:skipif: _tkinter is None
1191-
1192-
>>> turtle.showturtle()
1193-
11941182

11951183
.. function:: isvisible()
11961184

@@ -1960,9 +1948,7 @@ Using screen events
19601948
Start the event loop by calling Tkinter's :meth:`~tkinter.Misc.mainloop`
19611949
method. Must be the last statement in a turtle graphics program. Must
19621950
*not* be used if a script is run from within IDLE in -n mode (see
1963-
:ref:`idle-no-subprocess`). ::
1964-
1965-
>>> screen.mainloop()
1951+
:ref:`idle-no-subprocess`).
19661952

19671953

19681954
Input methods

‎Lib/turtle.py‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -752,9 +752,6 @@ def mainloop(self):
752752
Must be the last statement in a turtle graphics program. Must not
753753
be used if a script is run from within IDLE in -n mode (no
754754
subprocess).
755-
756-
Example (for a TurtleScreen instance named screen):
757-
>>> screen.mainloop()
758755
"""
759756
self.cv.tk.mainloop()
760757

@@ -1186,9 +1183,6 @@ def reset(self):
11861183
As a function, this method is only available under the name
11871184
resetscreen. The function reset is derived from the Turtle method
11881185
reset().
1189-
1190-
Example (for a TurtleScreen instance named screen):
1191-
>>> screen.resetscreen()
11921186
"""
11931187
for turtle in self._turtles:
11941188
turtle._setmode(self._mode)
@@ -2162,11 +2156,6 @@ def penup(self):
21622156
"""Pull the pen up -- no drawing when moving.
21632157
21642158
Aliases: penup | pu | up
2165-
2166-
No argument
2167-
2168-
Example (for a Turtle instance named turtle):
2169-
>>> turtle.penup()
21702159
"""
21712160
if not self._drawing:
21722161
return
@@ -2176,11 +2165,6 @@ def pendown(self):
21762165
"""Pull the pen down -- drawing when moving.
21772166
21782167
Aliases: pendown | pd | down
2179-
2180-
No argument.
2181-
2182-
Example (for a Turtle instance named turtle):
2183-
>>> turtle.pendown()
21842168
"""
21852169
if self._drawing:
21862170
return
@@ -2189,8 +2173,6 @@ def pendown(self):
21892173
def isdown(self):
21902174
"""Return True if pen is down, False if it's up.
21912175
2192-
No argument.
2193-
21942176
Example (for a Turtle instance named turtle):
21952177
>>> turtle.penup()
21962178
>>> turtle.isdown()
@@ -2379,9 +2361,6 @@ def showturtle(self):
23792361
"""Make the turtle visible.
23802362
23812363
Aliases: showturtle | st
2382-
2383-
Example (for a Turtle instance named turtle):
2384-
>>> turtle.showturtle()
23852364
"""
23862365
self.pen(shown=True)
23872366

@@ -2390,11 +2369,7 @@ def hideturtle(self):
23902369
23912370
Aliases: hideturtle | ht
23922371
2393-
It's a good idea to do this while you're in the middle of a complex
2394-
drawing, because hiding the turtle speeds up the drawing noticeably.
2395-
2396-
Example (for a Turtle instance named turtle):
2397-
>>> turtle.hideturtle()
2372+
If the pen is down, movement still draws.
23982373
"""
23992374
self.pen(shown=False)
24002375

0 commit comments

Comments
 (0)