Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ neg
Method
neg
recipes/Python/59884_RPN_Stack_class/recipe-59884.py:183–185 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
181
self.pop(2); self.push(newx)
182
183
def
neg(self):
#negate
184
newx = -self.getx()
185
self.pop(); self.push(newx)
186
187
def
sin(self):
188
newx = math.sin(self.getx())
Callers
nothing calls this directly
Calls
3
getx
Method · 0.95
pop
Method · 0.45
push
Method · 0.45
Tested by
no test coverage detected