MCPcopy
hub / github.com/Textualize/rich / Stack

Class Stack

rich/_stack.py:6–16  ·  view source on GitHub ↗

A small shim over builtin list.

Source from the content-addressed store, hash-verified

4
5
6class Stack(List[T]):
7 """A small shim over builtin list."""
8
9 @property
10 def top(self) -> T:
11 """Get top of stack."""
12 return self[-1]
13
14 def push(self, item: T) -> None:
15 """Push an item on to the stack (append in stack nomenclature)."""
16 self.append(item)

Callers 2

test_stackFunction · 0.90
__init__Method · 0.70

Calls

no outgoing calls

Tested by 1

test_stackFunction · 0.72