[Python-3000] turtle.Screen- how to implement best a Singleton
Terry Reedy
tjreedy at udel.edu
Mon Aug 18 23:48:21 CEST 2008
> I, for my part, prefer the latter solution (b). Example: a student,
> having (interactively) produced some design using some turtle t =
> Turtle() decides spontaneously to change backgroundcolor. s = Screen();
> s.bgcolor("pink") should do this for her -
My perhaps naive view is that students should be given name S bound to
the single Screen object and not have direct access to the Screen class
object to ever call it. S.bgcolor should be all that they need to do.
More information about the Python-3000
mailing list