Skip to content

Commit 6efa164

Browse files
authored
StackUnderflowError
1 parent 2fe1dc5 commit 6efa164

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data_structures/stacks/stack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def pop(self):
4141
>>> Stack().pop()
4242
Traceback (most recent call last):
4343
....
44-
StackOverflowError
44+
StackUnderflowError
4545
"""
4646
if not self.stack:
4747
raise StackUnderflowError
@@ -54,7 +54,7 @@ def peek(self):
5454
>>> Stack().pop()
5555
Traceback (most recent call last):
5656
....
57-
StackOverflowError
57+
StackUnderflowError
5858
"""
5959
if not self.stack:
6060
raise StackUnderflowError

0 commit comments

Comments
 (0)