Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ pow
Function
pow
recipes/Python/466320_Another_memoize/recipe-466320.py:52–56 ·
view source on GitHub ↗
(x, p=2)
Source
from the content-addressed store, hash-verified
50
51
@memoize
52
def
pow(x, p=2):
53
if
p==1:
54
return
x
55
else
:
56
return
x * pow(x, p=p-1)
57
58
print [pow(3, p=i)
for
i in xrange(1, 6)]
59
Callers
12
recipe-466320.py
File · 0.70
recipe-156453.py
File · 0.50
bin2dec
Function · 0.50
main
Function · 0.50
PostfixSubEval
Function · 0.50
recipe-389202.py
File · 0.50
peval
Function · 0.50
calcDistance
Method · 0.50
ca_data
Function · 0.50
__pow__
Method · 0.50
nth
Method · 0.50
pow
Method · 0.50
Calls
no outgoing calls
Tested by
no test coverage detected