MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / setindex

Method setindex

tools/python-3.11.9-amd64/Tools/demo/sortvisu.py:241–253  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

239 other.setindex(here)
240
241 def setindex(self, index):
242 nsteps = steps(self.index, index)
243 if not nsteps: return
244 if self.array.speed == "fastest":
245 nsteps = 0
246 oldpts = self.position()
247 self.index = index
248 newpts = self.position()
249 trajectory = interpolate(oldpts, newpts, nsteps)
250 self.canvas.tag_raise(self.item_id)
251 for pts in trajectory:
252 self.canvas.coords(self.item_id, pts)
253 self.array.wait(50)
254
255 def swapwith(self, other):
256 nsteps = steps(self.index, other.index)

Callers 1

mouse_upMethod · 0.80

Calls 6

positionMethod · 0.95
stepsFunction · 0.85
interpolateFunction · 0.85
tag_raiseMethod · 0.45
coordsMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected