MCPcopy Index your code
hub / github.com/python/cpython / _pointlist

Method _pointlist

Lib/turtle.py:739–749  ·  view source on GitHub ↗

returns list of coordinate-pairs of points of item Example (for insiders): >>> from turtle import * >>> getscreen()._pointlist(getturtle().turtle._item) [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982), (9.9999999999999982, 0.0)] >>>

(self, item)

Source from the content-addressed store, hash-verified

737 return self.cv.type(item)
738
739 def _pointlist(self, item):
740 """returns list of coordinate-pairs of points of item
741 Example (for insiders):
742 >>> from turtle import *
743 >>> getscreen()._pointlist(getturtle().turtle._item)
744 [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982),
745 (9.9999999999999982, 0.0)]
746 >>> """
747 cl = self.cv.coords(item)
748 pl = [(cl[i], -cl[i+1]) for i in range(0, len(cl), 2)]
749 return pl
750
751 def _setscrollregion(self, srx1, sry1, srx2, sry2):
752 self.cv.config(scrollregion=(srx1, sry1, srx2, sry2))

Callers 1

_gotoMethod · 0.80

Calls 1

coordsMethod · 0.45

Tested by

no test coverage detected