MCPcopy Index your code
hub / github.com/python/cpython / fact

Function fact

Lib/test/test_itertools.py:68–70  ·  view source on GitHub ↗

Factorial

(n)

Source from the content-addressed store, hash-verified

66 return reduce(operator.mul, iterable, 1)
67
68def fact(n):
69 'Factorial'
70 return prod(range(1, n+1))
71
72# root level methods for pickling ability
73def testR(r):

Callers 6

factMethod · 0.85
fMethod · 0.85
test_combinationsMethod · 0.85
numcombsMethod · 0.85
test_permutationsMethod · 0.85
test_combinatoricsMethod · 0.85

Calls 1

prodFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…