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

Method __init__

Infix_to_Postfix.py:6–13  ·  view source on GitHub ↗
(self, capacity)

Source from the content-addressed store, hash-verified

4class Conversion:
5 # Constructor to initialize the class variables
6 def __init__(self, capacity):
7 self.top = -1
8 self.capacity = capacity
9 # This array is used a stack
10 self.array = []
11 # Precedence setting
12 self.output = []
13 self.precedence = {"+": 1, "-": 1, "*": 2, "/": 2, "^": 3}
14
15 # check if the stack is empty
16 def isEmpty(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected