[docs] Turtle graphics, what is the function done doing?
szepesva at ualberta.ca
Fri Mar 16 03:07:01 CET 2012
I have found another minor issue.
In Section 18.104.22.168, Using Screen Events,
it is (implicitly) suggested that the functions
turtle.onclick(fun, btn=1, add=None)
turtle.onscreenclick(fun, btn=1, add=None)
will behave identically.
However, what happens is that turtle.onclick will call onclick on the
default turtle and is not identical to an Screen().onclick()
(the example assumes you used import turtle at the beginning).
I would suggest this to be clarified in the documentation (looking at
the source, this is because turtle.onclick is bound twice when the
module is imported; first to the default screen's method, and then to
the default turtle's corresponding method).
On 11-10-31 3:17 AM, Sandro Tosi wrote:
> Hello Csaba,
> On Tue, Oct 18, 2011 at 16:54, Csaba Szepesvari<szepesva at ualberta.ca> wrote:
>> Look at the example code at:
>> from turtle import *
>> color('red', 'yellow')
>> while True:
>> if abs(pos())< 1:
>> It calls the done() function at the end. However, this function is not
>> My experimentation shows that this is really coming from the turtle module,
>> so it should be documented here.. (or at least pls give some pointer to its
> This has now been fixed with these commits:
More information about the docs