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

Method push

Python/Turtle.py:831–837  ·  view source on GitHub ↗
(self, item)

Source from the content-addressed store, hash-verified

829 self.buffer = [[None]] * bufsize
830 self.ptr = -1
831 def push(self, item):
832 if self.bufsize > 0:
833 if not self.cumulate:
834 self.ptr = (self.ptr + 1) % self.bufsize
835 self.buffer[self.ptr] = item
836 else:
837 self.buffer[self.ptr].append(item)
838 def pop(self):
839 if self.bufsize > 0:
840 item = self.buffer[self.ptr]

Callers 15

bfsMethod · 0.45
circleMethod · 0.45
penMethod · 0.45
stampMethod · 0.45
_gotoMethod · 0.45
_rotateMethod · 0.45
begin_fillMethod · 0.45
end_fillMethod · 0.45
dotMethod · 0.45
_writeMethod · 0.45
writeMethod · 0.45
stackUsingLLFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected