]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-125665: Update turtledemo docstrings with correct file names (#125691)
authorWulian <1055917385@qq.com>
Wed, 23 Oct 2024 20:29:32 +0000 (04:29 +0800)
committerGitHub <noreply@github.com>
Wed, 23 Oct 2024 20:29:32 +0000 (16:29 -0400)
Co-authored-by: Wulian <xiguawulian@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
20 files changed:
Doc/library/turtle.rst
Lib/turtledemo/bytedesign.py
Lib/turtledemo/chaos.py
Lib/turtledemo/clock.py
Lib/turtledemo/colormixer.py
Lib/turtledemo/forest.py
Lib/turtledemo/fractalcurves.py
Lib/turtledemo/lindenmayer.py
Lib/turtledemo/minimal_hanoi.py
Lib/turtledemo/nim.py
Lib/turtledemo/paint.py
Lib/turtledemo/peace.py
Lib/turtledemo/penrose.py
Lib/turtledemo/planet_and_moon.py
Lib/turtledemo/rosette.py
Lib/turtledemo/round_dance.py
Lib/turtledemo/sorting_animate.py
Lib/turtledemo/tree.py
Lib/turtledemo/two_canvases.py
Lib/turtledemo/yinyang.py

index efa4b6f8f1d3f9b1442af74872753dc132d46b23..8eb4f8271fcfaebb23a7d8ae94c21797c071f3d5 100644 (file)
@@ -2778,9 +2778,6 @@ Changes since Python 3.0
   :func:`Screen.numinput <numinput>`. These pop up input dialogs and return
   strings and numbers respectively.
 
-- Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py`
-  have been added to the :file:`Lib/turtledemo` directory.
-
 
 .. doctest::
    :skipif: _tkinter is None
index 476cdaabfceab1863f8250d3d2327cfbaaf21d2d..a5d76a6b6ff2957887c739ae48ee7dd9ff2d3650 100644 (file)
@@ -1,6 +1,4 @@
-"""      turtle-example-suite:
-
-        tdemo_bytedesign.py
+"""turtledemo/bytedesign.py
 
 An example adapted from the example-suite
 of PythonCard's turtle graphics.
index 6a45d0d807ef0b88bb2189a0bf82490ac3dd0df9..b25f0fa42c901dbce42907f3d38096f24ba9727a 100644 (file)
@@ -1,9 +1,7 @@
-# File: tdemo_chaos.py
-# Author: Gregor Lingl
-# Date: 2009-06-24
-
-# A demonstration of chaos
+"""turtledemo/chaos.py
 
+A demonstration of chaos.
+"""
 from turtle import *
 
 N = 80
index 8a630e29b8da501ff92810fd251e28b259a9a120..8b639066c4f440daba905d09840f5c9097c7b9a2 100644 (file)
@@ -1,12 +1,7 @@
-"""       turtle-example-suite:
-
-           turtledemo/clock.py
+"""turtledemo/clock.py
 
 Enhanced clock-program, showing date
-and time
-  ------------------------------------
-   Press STOP to exit the program!
-  ------------------------------------
+and time.
 """
 from turtle import *
 from datetime import datetime
index 448db83361a649eff317733a5b932a1989a8697f..f66012c81543170bcaa3a96f417f935c47aec514 100644 (file)
@@ -1,5 +1,4 @@
-# colormixer
-
+"""turtledemo/colormixer.py"""
 from turtle import Screen, Turtle, mainloop
 
 class ColorTurtle(Turtle):
index cac553223828db5439d6da611dde76a2a103e83c..e1fa85a577ffce28b5fc6f0aa29e50ca7ae65064 100644 (file)
@@ -1,14 +1,11 @@
-"""     turtlegraphics-example-suite:
+"""turtledemo/forest.py
 
-             tdemo_forest.py
+Displays a 'forest' of 3 breadth-first trees,
+similar to the one in tree.py.
+For further details, see tree.py.
 
-Displays a 'forest' of 3 breadth-first-trees
-similar to the one in tree.
-For further remarks see tree.py
-
-This example is a 'breadth-first'-rewrite of
-a Logo program written by Erich Neuwirth. See
-http://homepage.univie.ac.at/erich.neuwirth/
+This example is a breadth-first rewrite of
+a Logo program by Erich Neuwirth.
 """
 from turtle import Turtle, colormode, tracer, mainloop
 from random import randrange
index fda193e06fedeefcb619679661b0305b34516592..2d0a506a4f5b9f21cd60387e0b5e3155d0e626c6 100644 (file)
@@ -1,6 +1,4 @@
-"""      turtle-example-suite:
-
-        tdemo_fractalCurves.py
+"""turtledemo/fractalcurves.py
 
 This program draws two fractal-curve-designs:
 (1) A hilbert curve (in a box)
index 7c7a84796c3c28c96c823584d92464600b187096..eb309afb9381b1ed861f307ced0c5d2d7266bb4e 100644 (file)
@@ -1,6 +1,4 @@
-"""       turtle-example-suite:
-
-        xtx_lindenmayer_indian.py
+"""turtledemo/lindenmayer.py
 
 Each morning women in Tamil Nadu, in southern
 India, place designs, created by using rice
index 08d8b630fec3b4c5e22b4221767dbb65529fea29..e44330eaaf7f187adc32ea91f3bd9475b9febdeb 100644 (file)
@@ -1,6 +1,4 @@
-"""       turtle-example-suite:
-
-         tdemo_minimal_hanoi.py
+"""turtledemo/minimal_hanoi.py
 
 A minimal 'Towers of Hanoi' animation:
 A tower of 6 discs is transferred from the
@@ -12,9 +10,6 @@ is derived from the built-in type list.
 
 Discs are turtles with shape "square", but
 stretched to rectangles by shapesize()
- ---------------------------------------
-       To exit press STOP button
- ---------------------------------------
 """
 from turtle import *
 
index 9ae6cc5c01b9039981f31f4c28a470ac249ee5dc..f87c479714d66203d4ab3daaa922548d53a0c1ef 100644 (file)
@@ -1,6 +1,4 @@
-"""      turtle-example-suite:
-
-            tdemo_nim.py
+"""turtledemo/nim.py
 
 Play nim against the computer. The player
 who takes the last stick is the winner.
index 6e63d00445458957c7ec4ad9a3f520e57c1818a5..780300fb2da9d1850bde32615e5bd39c38068388 100644 (file)
@@ -1,12 +1,9 @@
-"""       turtle-example-suite:
+"""turtledemo/paint.py
 
-            tdemo_paint.py
-
-A simple  event-driven paint program
-
-- left mouse button moves turtle
-- middle mouse button changes color
-- right mouse button toggles between pen up
+A simple  event-driven paint program.
+- Left mouse button moves turtle.
+- Middle mouse button changes color.
+- Right mouse button toggles between pen up
 (no line drawn when the turtle moves) and
 pen down (line is drawn). If pen up follows
 at least two pen-down moves, the polygon that
@@ -14,8 +11,6 @@ includes the starting point is filled.
  -------------------------------------------
  Play around by clicking into the canvas
  using all three mouse buttons.
- -------------------------------------------
-          To exit press STOP button
  -------------------------------------------
 """
 from turtle import *
index fd6abe390ef1989bdd68782bcc49f2f5253c2536..d86c94a48a24723e98be0a393ca05d39bbcc81f6 100644 (file)
@@ -1,6 +1,4 @@
-"""       turtle-example-suite:
-
-              tdemo_peace.py
+"""turtledemo/peace.py
 
 A simple drawing suitable as a beginner's
 programming example. Aside from the
index ac12c899d3844ea80d976e612b1eacd5ab4965b8..ceaefedac24a67602868615b1c6710f6c81794f3 100644 (file)
@@ -1,6 +1,4 @@
-"""       xturtle-example-suite:
-
-          xtx_kites_and_darts.py
+"""turtledemo/penrose.py
 
 Constructs two aperiodic penrose-tilings,
 consisting of kites and darts, by the method
@@ -11,7 +9,7 @@ consisting of five kites and "star"
 consisting of five darts.
 
 For more information see:
- http://en.wikipedia.org/wiki/Penrose_tiling
+ https://en.wikipedia.org/wiki/Penrose_tiling
  -------------------------------------------
 """
 from turtle import *
index c0e2c5b79e173e3904b6c14eef85c706a188e374..571afcf922103f7359feece7ffffa56a4cc32631 100644 (file)
@@ -1,6 +1,4 @@
-"""       turtle-example-suite:
-
-        tdemo_planets_and_moon.py
+"""turtledemo/planets_and_moon.py
 
 Gravitational system simulation using the
 approximation method from Feynman-lectures,
index 47d0f00e9da9d15dc93b0814208949e86be618f5..48897a620f9d8ba2131822cc434e4a5f8dc0f93b 100644 (file)
@@ -1,6 +1,4 @@
-"""      turtle-example-suite:
-
-          tdemo_wikipedia3.py
+"""turtledemo/rosette.py
 
 This example is
 inspired by the Wikipedia article on turtle
index 10383614c6e974c7b0cbd3e9ad99ba8ee5371922..9da6389b213207dfe2d3b38401e3eb23cc423cff 100644 (file)
@@ -1,9 +1,4 @@
-"""      turtle-example-suite:
-
-         tdemo_round_dance.py
-
-(Needs version 1.1 of the turtle module that
-comes with Python 3.1)
+"""turtledemo/round_dance.py
 
 Dancing turtles have a compound shape
 consisting of a series of triangles of
index ef4946db38250ee3ed7f7dc2426bbd26f170d48b..e0a2877cd5d621a54971c61149df1b7d36659b77 100644 (file)
@@ -1,6 +1,4 @@
-"""
-
-         sorting_animation.py
+"""turtledemo/sorting_animation.py
 
 A minimal sorting algorithm animation:
 Sorts a shelf of 10 blocks using insertion
@@ -10,9 +8,6 @@ Shelves are implemented using builtin lists.
 
 Blocks are turtles with shape "square", but
 stretched to rectangles by shapesize()
- ---------------------------------------
-       To exit press space button
- ---------------------------------------
 """
 from turtle import *
 import random
index 12729e23688a48656cbdbc8818d9c8084c6ac320..6ad8fcc854a155c1b57c9bb1a65153a045c70901 100644 (file)
@@ -1,6 +1,4 @@
-"""      turtle-example-suite:
-
-             tdemo_tree.py
+"""turtledemo/tree.py
 
 Displays a 'breadth-first-tree' - in contrast
 to the classical Logo tree drawing programs,
index f3602585ab0592c393fbe9526cb5aae4ae902f6c..2c8020378edf1ba2b8428b824acf8048ce7895b7 100644 (file)
@@ -1,4 +1,4 @@
-"""turtledemo.two_canvases
+"""turtledemo/two_canvases.py
 
 Use TurtleScreen and RawTurtle to draw on two
 distinct canvases in a separate window. The
index 791060d17e6b6a8430a1461c0968c6f316311b71..6e92d4bf73919460ab6b3eb5e7419a004ea2006c 100644 (file)
@@ -1,6 +1,4 @@
-"""       turtle-example-suite:
-
-            tdemo_yinyang.py
+"""turtledemo/yinyang.py
 
 Another drawing suitable as a beginner's
 programming example.