Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ modulo
Method
modulo
recipes/Python/59884_RPN_Stack_class/recipe-59884.py:175–177 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
173
self.pop(2); self.push(newx)
174
175
def
modulo(self):
176
newx = self.gety() % self.getx()
177
self.pop(2); self.push(newx)
178
179
def
pow(self):
#raise y register to the x power
180
newx = self.gety()**self.getx()
Callers
nothing calls this directly
Calls
4
gety
Method · 0.95
getx
Method · 0.95
pop
Method · 0.45
push
Method · 0.45
Tested by
no test coverage detected