Spaces:
Sleeping
Sleeping
Download venv/lib/python3.14/site-packages/rich/_stack.py from HSR-DeepThink/Perhance: direct link, hf CLI and curl.
- Browser
- Download file 351 Bytes
-
https://huggingface.co/spaces/HSR-DeepThink/Perhance/resolve/main/venv/lib/python3.14/site-packages/rich/_stack.py
- Command line
-
hf download hf://spaces/HSR-DeepThink/Perhance/venv/lib/python3.14/site-packages/rich/_stack.py
-
curl -L -o _stack.py https://huggingface.co/spaces/HSR-DeepThink/Perhance/resolve/main/venv/lib/python3.14/site-packages/rich/_stack.py
351 Bytes
| from typing import List, TypeVar | |
| T = TypeVar("T") | |
| class Stack(List[T]): | |
| """A small shim over builtin list.""" | |
| def top(self) -> T: | |
| """Get top of stack.""" | |
| return self[-1] | |
| def push(self, item: T) -> None: | |
| """Push an item on to the stack (append in stack nomenclature).""" | |
| self.append(item) | |