]> granicus.if.org Git - python/commitdiff
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 29 Jun 2018 05:32:16 +0000 (22:32 -0700)
committerGitHub <noreply@github.com>
Fri, 29 Jun 2018 05:32:16 +0000 (22:32 -0700)
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@udel.edu>
Lib/turtledemo/penrose.py
Lib/turtledemo/rosette.py [moved from Lib/turtledemo/wikipedia.py with 100% similarity]
Lib/turtledemo/tree.py
Misc/NEWS.d/next/Library/2018-06-29-00-31-36.bpo-14117.3nvDuR.rst [new file with mode: 0644]

index f73c864b7b40a247028a17474ecec1f2a772aefc..f167ed1f353020ed2d053381b432aae285fb5694 100755 (executable)
@@ -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))
index 71fff355c7cf946e8b2db6c12ec6d62f473c44bd..e7f202e69223d2842dde8f11ebad1481d6c26475 100755 (executable)
@@ -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 (file)
index 0000000..eee55f2
--- /dev/null
@@ -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.