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

Method push

Lib/turtledemo/minimal_hanoi.py:29–32  ·  view source on GitHub ↗
(self, d)

Source from the content-addressed store, hash-verified

27 "create an empty tower. x is x-position of peg"
28 self.x = x
29 def push(self, d):
30 d.setx(self.x)
31 d.sety(-150+34*len(self))
32 self.append(d)
33 def pop(self):
34 d = list.pop(self)
35 d.sety(150)

Callers 2

mainFunction · 0.95
hanoiFunction · 0.45

Calls 3

setyMethod · 0.80
setxMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected