[issue3956] turtle.py - bug in Screen.__init__()

2008-09-29 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Committed (with the two proposed modifications) as r66686 and r66687. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-29 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > When 2.6 is out, what do you think is the right point for a further > discussion of this? (I think certainly not the bugtracker and > particularly not this issue. Depends on what you want to achieve with the discussion. If you want a publi

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Gregor Lingl
Gregor Lingl <[EMAIL PROTECTED]> added the comment: ... I meant: the right place for a further discussion Sorry, Gregor ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Gregor Lingl
Gregor Lingl <[EMAIL PROTECTED]> added the comment: Agreeing to this patch, I'd just like to mention, that nevertheless this change is not very pleasing for me. Not feeling that singleton with inheritance is a 'meaningless' but rather a 'very special' concept,the meaning of which could be explain

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Gregor Lingl
Gregor Lingl <[EMAIL PROTECTED]> added the comment: I agree to Martin's patch for 2.6, because it seems to provide a more clean solution. And, as he states, there will be time and opportunity to discuss it more thoroughly later to possibly find another approach. As I remarked before I know that s

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11643/singleton.diff ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Martin v. Löwis
Changes by Martin v. Löwis <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11645/singleton.diff ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Here is a patch that takes the alternative route, of making Screen a singleton function, and renaming the class to _Screen. Added file: http://bugs.python.org/file11643/singleton.diff ___ Python tracker <

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-28 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > I'll demonstrate here in a short interactive session (which you can > reproduce using IDLE with the -n switch as usual), why the solution > Martin proposes doesn't meet the requirements I tried to accomplish with > my code. This session 'si

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-25 Thread Gregor Lingl
Gregor Lingl <[EMAIL PROTECTED]> added the comment: First of all I'd like to point you at a posting which I posted to Python-dev on August 18th, where I addressed this issue in full detail. http://mail.python.org/pipermail/python-dev/2008-August/081846.html I hoped to provoke a clarifying disc

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-24 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: As a follow-up, I also don't understand the two if blocks in Screen.__init__: if there is meant to be a single Screen instance anyway, why have _root, _canvas, and _title as class variables, whereas everything else is in (shared) instance var

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-24 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I'm opposed to this patch. As a design principle, any class should always call its base class' __init__, unless that is known to be empty. With this patch, the base __init__ call becomes conditional, which hints at a design bug of the entire

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-24 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Looks ok, like the 3.0 code. Benjamin, please review and commit. -- assignee: -> benjamin.peterson nosy: +georg.brandl resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]>

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-24 Thread Gregor Lingl
Gregor Lingl <[EMAIL PROTECTED]> added the comment: Do the patch of turtleDemo.py if and only if the patch of turtle.py is accepted. Added file: http://bugs.python.org/file11592/turtleDemo.diff ___ Python tracker <[EMAIL PROTECTED]>

[issue3956] turtle.py - bug in Screen.__init__()

2008-09-24 Thread Gregor Lingl
New submission from Gregor Lingl <[EMAIL PROTECTED]>: There is a bug in Screen.__init__() (The Screen class uses the Borg idiom to simulate a Singleton). This bug is demonstrated best interactively from IDLE (using the -n switch) like this: >>> from turtle import Screen, Turtle >>> t = Turtle()