Skip to main content

Timeline for Stack data structure in Python 3

Current License: CC BY-SA 4.0

3 events
when toggle format what by license comment
Nov 19, 2019 at 16:58 comment added nigel222 Sure, but the question says "a stack". A refectory stack doesn't error, it just continues to exist in a state of emptyness. Neither is more correct than the other. Seems pointless to precisely re-inplement what is already provided as a standard list object.
Nov 19, 2019 at 16:50 comment added AlexV Throwing IndexError is what I would expect and similar to what happens if you'd try to call pop() on an empty list ([].pop() -> IndexError: pop from empty list).
Nov 19, 2019 at 15:18 history answered nigel222 CC BY-SA 4.0