[docs] [issue7061] Improve 24.5. turtle doc

Terry J. Reedy report at bugs.python.org
Sun Oct 31 00:01:59 CEST 2010

Terry J. Reedy <tjreedy at udel.edu> added the comment:

On initialization: the json doc has 6 examples. Each starts with 'import json' so each is independent. However, I agree that doing the same for turtle examples would be a bit much. On the other hand, I think
24.5.3. *Methods of RawTurtle/Turtle and corresponding functions*
should explicitly give the needed code. So I would change "Most of the examples in this section refer to a Turtle instance called turtle." to

"The examples below that refer to a Turtle instance called turtle require something like the following to be run first:

>>> from turtle import turtle; turtle = Turtle()

The three examples above turtle.shapetransform start with
>>> turtle.reset()
I presume they need that to run reliably. If it is also needed for the shapetransform example to run correctly, then I would just added it there too.

I will post more after I compare my original post to your revision.


Python tracker <report at bugs.python.org>

More information about the docs mailing list