Skip to content

Commit 9c01db4

Browse files
gh-125665: Update turtledemo docstrings with correct file names (#125691)
Co-authored-by: Wulian <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
1 parent 6f26d49 commit 9c01db4

20 files changed

+32
-86
lines changed

Doc/library/turtle.rst

-3
Original file line numberDiff line numberDiff line change
@@ -2778,9 +2778,6 @@ Changes since Python 3.0
27782778
:func:`Screen.numinput <numinput>`. These pop up input dialogs and return
27792779
strings and numbers respectively.
27802780

2781-
- Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py`
2782-
have been added to the :file:`Lib/turtledemo` directory.
2783-
27842781

27852782
.. doctest::
27862783
:skipif: _tkinter is None

Lib/turtledemo/bytedesign.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_bytedesign.py
1+
"""turtledemo/bytedesign.py
42
53
An example adapted from the example-suite
64
of PythonCard's turtle graphics.

Lib/turtledemo/chaos.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# File: tdemo_chaos.py
2-
# Author: Gregor Lingl
3-
# Date: 2009-06-24
4-
5-
# A demonstration of chaos
1+
"""turtledemo/chaos.py
62
3+
A demonstration of chaos.
4+
"""
75
from turtle import *
86

97
N = 80

Lib/turtledemo/clock.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
""" turtle-example-suite:
2-
3-
turtledemo/clock.py
1+
"""turtledemo/clock.py
42
53
Enhanced clock-program, showing date
6-
and time
7-
------------------------------------
8-
Press STOP to exit the program!
9-
------------------------------------
4+
and time.
105
"""
116
from turtle import *
127
from datetime import datetime

Lib/turtledemo/colormixer.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# colormixer
2-
1+
"""turtledemo/colormixer.py"""
32
from turtle import Screen, Turtle, mainloop
43

54
class ColorTurtle(Turtle):

Lib/turtledemo/forest.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
""" turtlegraphics-example-suite:
1+
"""turtledemo/forest.py
22
3-
tdemo_forest.py
3+
Displays a 'forest' of 3 breadth-first trees,
4+
similar to the one in tree.py.
5+
For further details, see tree.py.
46
5-
Displays a 'forest' of 3 breadth-first-trees
6-
similar to the one in tree.
7-
For further remarks see tree.py
8-
9-
This example is a 'breadth-first'-rewrite of
10-
a Logo program written by Erich Neuwirth. See
11-
http://homepage.univie.ac.at/erich.neuwirth/
7+
This example is a breadth-first rewrite of
8+
a Logo program by Erich Neuwirth.
129
"""
1310
from turtle import Turtle, colormode, tracer, mainloop
1411
from random import randrange

Lib/turtledemo/fractalcurves.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_fractalCurves.py
1+
"""turtledemo/fractalcurves.py
42
53
This program draws two fractal-curve-designs:
64
(1) A hilbert curve (in a box)

Lib/turtledemo/lindenmayer.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
xtx_lindenmayer_indian.py
1+
"""turtledemo/lindenmayer.py
42
53
Each morning women in Tamil Nadu, in southern
64
India, place designs, created by using rice

Lib/turtledemo/minimal_hanoi.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_minimal_hanoi.py
1+
"""turtledemo/minimal_hanoi.py
42
53
A minimal 'Towers of Hanoi' animation:
64
A tower of 6 discs is transferred from the
@@ -12,9 +10,6 @@
1210
1311
Discs are turtles with shape "square", but
1412
stretched to rectangles by shapesize()
15-
---------------------------------------
16-
To exit press STOP button
17-
---------------------------------------
1813
"""
1914
from turtle import *
2015

Lib/turtledemo/nim.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_nim.py
1+
"""turtledemo/nim.py
42
53
Play nim against the computer. The player
64
who takes the last stick is the winner.

Lib/turtledemo/paint.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
""" turtle-example-suite:
1+
"""turtledemo/paint.py
22
3-
tdemo_paint.py
4-
5-
A simple event-driven paint program
6-
7-
- left mouse button moves turtle
8-
- middle mouse button changes color
9-
- right mouse button toggles between pen up
3+
A simple event-driven paint program.
4+
- Left mouse button moves turtle.
5+
- Middle mouse button changes color.
6+
- Right mouse button toggles between pen up
107
(no line drawn when the turtle moves) and
118
pen down (line is drawn). If pen up follows
129
at least two pen-down moves, the polygon that
1310
includes the starting point is filled.
1411
-------------------------------------------
1512
Play around by clicking into the canvas
1613
using all three mouse buttons.
17-
-------------------------------------------
18-
To exit press STOP button
1914
-------------------------------------------
2015
"""
2116
from turtle import *

Lib/turtledemo/peace.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_peace.py
1+
"""turtledemo/peace.py
42
53
A simple drawing suitable as a beginner's
64
programming example. Aside from the

Lib/turtledemo/penrose.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" xturtle-example-suite:
2-
3-
xtx_kites_and_darts.py
1+
"""turtledemo/penrose.py
42
53
Constructs two aperiodic penrose-tilings,
64
consisting of kites and darts, by the method
@@ -11,7 +9,7 @@
119
consisting of five darts.
1210
1311
For more information see:
14-
http://en.wikipedia.org/wiki/Penrose_tiling
12+
https://en.wikipedia.org/wiki/Penrose_tiling
1513
-------------------------------------------
1614
"""
1715
from turtle import *

Lib/turtledemo/planet_and_moon.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_planets_and_moon.py
1+
"""turtledemo/planets_and_moon.py
42
53
Gravitational system simulation using the
64
approximation method from Feynman-lectures,

Lib/turtledemo/rosette.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_wikipedia3.py
1+
"""turtledemo/rosette.py
42
53
This example is
64
inspired by the Wikipedia article on turtle

Lib/turtledemo/round_dance.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_round_dance.py
4-
5-
(Needs version 1.1 of the turtle module that
6-
comes with Python 3.1)
1+
"""turtledemo/round_dance.py
72
83
Dancing turtles have a compound shape
94
consisting of a series of triangles of

Lib/turtledemo/sorting_animate.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""
2-
3-
sorting_animation.py
1+
"""turtledemo/sorting_animation.py
42
53
A minimal sorting algorithm animation:
64
Sorts a shelf of 10 blocks using insertion
@@ -10,9 +8,6 @@
108
119
Blocks are turtles with shape "square", but
1210
stretched to rectangles by shapesize()
13-
---------------------------------------
14-
To exit press space button
15-
---------------------------------------
1611
"""
1712
from turtle import *
1813
import random

Lib/turtledemo/tree.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_tree.py
1+
"""turtledemo/tree.py
42
53
Displays a 'breadth-first-tree' - in contrast
64
to the classical Logo tree drawing programs,

Lib/turtledemo/two_canvases.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""turtledemo.two_canvases
1+
"""turtledemo/two_canvases.py
22
33
Use TurtleScreen and RawTurtle to draw on two
44
distinct canvases in a separate window. The

Lib/turtledemo/yinyang.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
""" turtle-example-suite:
2-
3-
tdemo_yinyang.py
1+
"""turtledemo/yinyang.py
42
53
Another drawing suitable as a beginner's
64
programming example.

0 commit comments

Comments
 (0)