Documentation
Docs say that math.sumprod(p, q) is roughly equivalent to:
sum(itertools.starmap(operator.mul, zip(p, q, strict=True)))
This is not useful for people who don't already know about itertools.starmap and operator.mul. IMO that is a shame, because math.sumprod is not that complicated to understand. It would be better to describe it as:
sum(x*y for x, y in zip(p, q, strict=True))
Linked PRs
Documentation
Docs say that
math.sumprod(p, q)is roughly equivalent to:This is not useful for people who don't already know about
itertools.starmapandoperator.mul. IMO that is a shame, becausemath.sumprodis not that complicated to understand. It would be better to describe it as:Linked PRs
math.sumproddocumentation #130206