Return the nth element of the stack, or ``self.sentinel`` if n is greater than the stack size.
(self, n: int)
| 65 | sentinel = object() |
| 66 | |
| 67 | def get(self, n: int) -> Any: |
| 68 | """Return the nth element of the stack, or ``self.sentinel`` if n is |
| 69 | greater than the stack size. |
| 70 | """ |
| 71 | return self[n] if n < len(self) else self.sentinel |
| 72 | |
| 73 | def next(self) -> Any: |
| 74 | if self: |
no outgoing calls