MCPcopy Index your code
hub / github.com/BeeBombshell/Python-DSA / popleft

Method popleft

DSA/deque.py:51–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49 return ret
50
51 def popleft(self):
52 if self.is_empty():
53 raise IndexError()
54 ret = self.buf[self.head]
55 self.head += 1
56 self.head %= self.length
57 return ret
58
59 def __len__(self):
60 return (self.tail - self.head) % self.length

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.95

Tested by

no test coverage detected