Pop an element off of the top of the stack.
(self)
| 29 | self.stack.append(data) |
| 30 | |
| 31 | def pop(self): |
| 32 | """ Pop an element off of the top of the stack.""" |
| 33 | if self.stack: |
| 34 | return self.stack.pop() |
| 35 | else: |
| 36 | raise IndexError('pop from an empty stack') |
| 37 | |
| 38 | def peek(self): |
| 39 | """ Peek at the top-most element of the stack.""" |
no outgoing calls
no test coverage detected