MCPcopy Create free account
hub / github.com/ActiveState/code / add

Method add

recipes/Python/59884_RPN_Stack_class/recipe-59884.py:159–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

157 #do some math
158
159 def add(self):
160 newx = self.gety() + self.getx()
161 self.pop(2); self.push(newx)
162
163 def sub(self):
164 newx = self.gety() - self.getx()

Callers

nothing calls this directly

Calls 4

getyMethod · 0.95
getxMethod · 0.95
popMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected