[Python-checkins] bpo-14117: Make minor tweaks to turtledemo (GH-8002)

Miss Islington (bot) webhook-mailer at python.org
Fri Jun 29 01:32:19 EDT 2018


https://github.com/python/cpython/commit/00e05242ae650bc29e8052a5fb79cbb83224a657
commit: 00e05242ae650bc29e8052a5fb79cbb83224a657
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-06-28T22:32:16-07:00
summary:

bpo-14117: Make minor tweaks to turtledemo (GH-8002)


The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.
(cherry picked from commit 891a1f86d415779cf67ca23e626a868e586feb05)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
A Lib/turtledemo/rosette.py
A Misc/NEWS.d/next/Library/2018-06-29-00-31-36.bpo-14117.3nvDuR.rst
D Lib/turtledemo/wikipedia.py
M Lib/turtledemo/penrose.py
M Lib/turtledemo/tree.py

diff --git a/Lib/turtledemo/penrose.py b/Lib/turtledemo/penrose.py
index f73c864b7b40..f167ed1f3530 100755
--- a/Lib/turtledemo/penrose.py
+++ b/Lib/turtledemo/penrose.py
@@ -144,9 +144,6 @@ def test(l=200, n=4, fun=sun, startpos=(0,0), th=2):
     draw(l, n, th)
     tracer(1)
     c = clock()
-    print("Calculation:   %7.4f s" % (b - a))
-    print("Drawing:  %7.4f s" % (c - b))
-    print("Together: %7.4f s" % (c - a))
     nk = len([x for x in tiledict if tiledict[x]])
     nd = len([x for x in tiledict if not tiledict[x]])
     print("%d kites and %d darts = %d pieces." % (nk, nd, nk+nd))
diff --git a/Lib/turtledemo/wikipedia.py b/Lib/turtledemo/rosette.py
similarity index 100%
rename from Lib/turtledemo/wikipedia.py
rename to Lib/turtledemo/rosette.py
diff --git a/Lib/turtledemo/tree.py b/Lib/turtledemo/tree.py
index 71fff355c7cf..e7f202e69223 100755
--- a/Lib/turtledemo/tree.py
+++ b/Lib/turtledemo/tree.py
@@ -49,7 +49,6 @@ def maketree():
     t = tree([p], 200, 65, 0.6375)
     for x in t:
         pass
-    print(len(p.getscreen().turtles()))
 
 def main():
     a=clock()
diff --git a/Misc/NEWS.d/next/Library/2018-06-29-00-31-36.bpo-14117.3nvDuR.rst b/Misc/NEWS.d/next/Library/2018-06-29-00-31-36.bpo-14117.3nvDuR.rst
new file mode 100644
index 000000000000..eee55f24c811
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-06-29-00-31-36.bpo-14117.3nvDuR.rst
@@ -0,0 +1,3 @@
+Make minor tweaks to turtledemo. The 'wikipedia' example is now 'rosette',
+decribing what it draws.  The 'penrose' print output is reduced. The'1024'
+output of 'tree' is eliminated.



More information about the Python-checkins mailing list