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

Martin v. Löwis report at bugs.python.org
Wed Sep 24 21:07:32 CEST 2008


Martin v. Löwis <martin at v.loewis.de> 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 variables?

How could _root be initialized, and _canvas not (or vice versa)?

And why is Turtle._screen being set to the last Screen instance being
created (even under this patch), whereas all other initialization is
keyed to the creation of the first Screen instance?

This code could surely use some comments.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3956>
_______________________________________


More information about the Python-bugs-list mailing list