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

Method __bool__

data_structures/stacks/stack.py:29–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 self.limit = limit
28
29 def __bool__(self) -> bool:
30 return bool(self.stack)
31
32 def __str__(self) -> str:
33 return str(self.stack)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected