[New-bugs-announce] [issue5923] turtle.py update: 1.0 --> 1.1

Gregor Lingl report at bugs.python.org
Mon May 4 16:56:38 CEST 2009

New submission from Gregor Lingl <gregorlingl at users.sourceforge.net>:

I propose to update turtle.py with this new version 1.1 of the turtle

Summary of changes:

1. a few bugfixes, with 1 - 5 lines of code changed for each;
   these concern bugs that prevented turtle to run correctly

2. I've added four methods to the class TurtleScreeenBase:
   _onkeypress(fun, key)  (supplementing _onkeyrelease)
   mainloop()  (which is now a Screen-method and a function)
   textinput(title, prompt)
   numinput(title, prompt, default, minval, maxval)
          the latter two remedy the complete lack of input methods

   _onkey, an internal method name is changed to _onkeyrelease

3. I've added one method to the class TurtleScreen:
   onkeypress(fun, key=None)        implemented in analogy to the
already present onkey()
       which got onkeyrelease as an alias.

4. I've changed several portions of the code that affect
  the representation of the turtleshape thus making it
  more compact (by removing some duplicated code) and more
  powerful, i. e. by adding the possibility to apply
  shearings to turtleshapes (in addition to the already present
  scaling and rotating transformations). Thus now the full
  range of (non singular) linear transformations is available.

  New methods in class RawTurtle:
   shearfactor(shear=None)    set or get the shearfactor
   shapetransform(t11, t12, t21, t22)
                   set or get the shape transform directly
   get_shapepoly() return the polygon of the current shape

  I've enhanced the functionality of tiltangle(angle=None)
  to contain also that of settiltangle and I propose to
  declare settiltangle as deprecated.
  5. I've removed a lot of codelines that were commented out
  during the process of transferring the module from 2.6
  to 3.0

6. I've implemented the bugfix for http://bugs.python.org/issue4117
  according do my proposition there and I strongly
  recommend this change again, as the bug described is very
  annoying, the fix is easy and no one proposed a better

For convenience I'll add the diff subsequently


components: Library (Lib)
files: turtle31.py
messages: 87132
nosy: benjamin.peterson, gregorlingl, loewis, rhettinger
severity: normal
status: open
title: turtle.py update: 1.0 --> 1.1
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13870/turtle31.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list