[Python-Dev] xturtle.py a replacement for turtle.py(!?) ATTENTION PLEASE! (original) (raw)
Gregor Lingl glingl at aon.at
Wed Jun 28 22:05:19 CEST 2006
- Previous message: [Python-Dev] xturtle.py a replacement for turtle.py(!?)
- Next message: [Python-Dev] xturtle.py a replacement for turtle.py(!?) ATTENTION PLEASE!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin v. Löwis schrieb:
Collin Winter wrote:
While I have no opinion on Gregor's app, and while I fully agree that new language features and stdlib modules should generally stay out of bug-fix point releases, xturtle doesn't seem to rise to that level (and hence, those restrictions).
It's a stdlib module, even if no other stdlib modules depend on it; try "import turtle". In the specific case, the problem with adding it to 2.5 is that xturtle is a huge rewrite, so ideally, the code should be reviewed before being added. Given that this is a lot of code, nobody will have the time to perform a serious review. It will be hard enough to find somebody to review it for 2.6 - often, changes of this size take several years to review (primarily because it is so specialized that only few people even consider reviewing it). Sorry Martin, but to me this seems not to be the right way to manage things. We have turtle.py revised in Python2.5b1
Please try this example (as I just did) :
IDLE 1.2b1 ==== No Subprocess ====
from turtle import * begin_fill() circle(100,90) # observe the turtle backward(200) circle(100,90) color("red") end_fill() IDLE internal error in runcode() Traceback (most recent call last): File "<pyshell#6>", line 1, in end_fill() File "C:\Python25\lib\lib-tk\turtle.py", line 724, in end_fill def end_fill(): _getpen.end_fill() AttributeError: 'function' object has no attribute 'end_fill'
An error occurs, because in line 724 it should read def end_fill(): _getpen().end_fill()
(Who reviewed it? This is a newly_added function - did nobody try it out yet? Incredible!!)
I corrected it and did:
IDLE 1.2b1 ==== No Subprocess ====
from turtle import * begin_fill() circle(100,90) backward(200) circle(100,90) color("red") end_fill()
What a shame!! An immanent bug, persistent for years now!
Is this what Anthony Baxter calls "the most solid Python release ever"
In contrast to this:
IDLE 1.2b1 ==== No Subprocess ====
from xturtle import * begin_fill() circle(100,90) backward(200) circle(100,90) color("red") end_fill()
works correctly and the turtle travels along the arcs with the same speed as along the straight lines. Bugs like the one I detected above (by chance) cannot occur in the code of my xturtle, because I don't have to type the definitions of those frunctions into the script by hand. Instead they are generated automatically from the corresponding methods of RawPen and Pen respectively.
And aren't 25+ bugfree samplescripts of great variety and broad range in complexity to consider a more reliable proof of at least usability than the procedure you applied?
My xturtle is certainly not bugfree. But it's (also certainly) not worse than turtle.py and way more versatile.
A more courageous and less bureaucratic approach to the problem would be appropriate. Perhaps combined with some fantasy. For example: put turtle.py and xturtle.py both into beta2 and see which one stands better the (beta)test of time. Or perhaps you have an even better idea!
Regards, Gregor
P.S.: If this posting doesn't move points of view, at least it reveals one fixable bug in turtle.py (albeit also one unfixable!)
Regards, Martin
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/glingl%40aon.at
- Previous message: [Python-Dev] xturtle.py a replacement for turtle.py(!?)
- Next message: [Python-Dev] xturtle.py a replacement for turtle.py(!?) ATTENTION PLEASE!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]