Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ __init__
Method
__init__
recipes/Python/59884_RPN_Stack_class/recipe-59884.py:32–35 ·
view source on GitHub ↗
(self, start=[])
Source
from the content-addressed store, hash-verified
30
class
Stack:
31
32
def
__init__(self, start=[]):
33
self.stack = []
34
for
x in start: self.push(x)
35
self.reverse()
36
37
#these first few carry out basic stack functions. always necessary
38
Callers
nothing calls this directly
Calls
2
push
Method · 0.95
reverse
Method · 0.45
Tested by
no test coverage detected