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

Method insert

Lib/turtledemo/sorting_animate.py:68–76  ·  view source on GitHub ↗
(self, key, b)

Source from the content-addressed store, hash-verified

66 return b
67
68 def insert(self, key, b):
69 self._open_gap_from_i(key)
70 list.insert(self, key, b)
71 b.setx(self.x + 34 * key)
72 width, _, _ = b.shapesize()
73 # align blocks by the bottom edge
74 y_offset = width / 2 * 20
75 b.sety(self.y + y_offset)
76 b.unglow()
77
78def isort(shelf):
79 length = len(shelf)

Callers 5

loadfileMethod · 0.45
isortFunction · 0.45
ssortFunction · 0.45
partitionFunction · 0.45
randomizeFunction · 0.45

Calls 5

_open_gap_from_iMethod · 0.95
shapesizeMethod · 0.80
setyMethod · 0.80
unglowMethod · 0.80
setxMethod · 0.45

Tested by

no test coverage detected