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

Method get_poly

Python/Turtle.py:3364–3375  ·  view source on GitHub ↗

Return the lastly recorded polygon. No argument. Example (for a Turtle instance named turtle): >>> p = turtle.get_poly() >>> turtle.register_shape("myFavouriteShape", p)

(self)

Source from the content-addressed store, hash-verified

3362 self._creatingPoly = False
3363
3364 def get_poly(self):
3365 """Return the lastly recorded polygon.
3366
3367 No argument.
3368
3369 Example (for a Turtle instance named turtle):
3370 >>> p = turtle.get_poly()
3371 >>> turtle.register_shape("myFavouriteShape", p)
3372 """
3373 ## check if there is any poly?
3374 if self._poly is not None:
3375 return tuple(self._poly)
3376
3377 def getscreen(self):
3378 """Return the TurtleScreen object, the turtle is drawing on.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected