MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

data_structures/stacks/stack.py:25–27  ·  view source on GitHub ↗
(self, limit: int = 10)

Source from the content-addressed store, hash-verified

23 """
24
25 def __init__(self, limit: int = 10):
26 self.stack: list[T] = []
27 self.limit = limit
28
29 def __bool__(self) -> bool:
30 return bool(self.stack)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected