MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / getturtle

Method getturtle

Python/Turtle.py:3393–3408  ·  view source on GitHub ↗

Return the Turtleobject itself. No argument. Only reasonable use: as a function to return the 'anonymous turtle': Example: >>> pet = getturtle() >>> pet.fd(50) >>> pet >>> turtles() [<turt

(self)

Source from the content-addressed store, hash-verified

3391 return self.screen
3392
3393 def getturtle(self):
3394 """Return the Turtleobject itself.
3395
3396 No argument.
3397
3398 Only reasonable use: as a function to return the 'anonymous turtle':
3399
3400 Example:
3401 >>> pet = getturtle()
3402 >>> pet.fd(50)
3403 >>> pet
3404 <turtle.Turtle object at 0x0187D810>
3405 >>> turtles()
3406 [<turtle.Turtle object at 0x0187D810>]
3407 """
3408 return self
3409
3410 getpen = getturtle
3411

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected