https://github.com/python/cpython/blob/3f84a19e6291db682fc9a570e7612e80e2ffbbb5/Modules/mathmodule.c#L2835 Obviously, should be ``p_i`` in the last OR operand, c.f. [L2824](https://github.com/python/cpython/blob/3f84a19e6291db682fc9a570e7612e80e2ffbbb5/Modules/mathmodule.c#L2824). Factored out from #110000. I think this should be fixed regardless on the fate of that pr. 052d7de867 has also simple test for this if. <!-- gh-linked-prs --> ### Linked PRs * gh-111416 * gh-111419 <!-- /gh-linked-prs -->
Activity
rhettinger commentedon Oct 28, 2023
@skirpichev Care to make a PR with test for this?
pythongh-111342: fix typo in math.sumprod
skirpichev commentedon Oct 28, 2023
Yep. #111416
gh-111342: fix typo in math.sumprod (GH-111416)
pythongh-111342: fix typo in math.sumprod (pythonGH-111416)
[3.12] gh-111342: fix typo in math.sumprod (GH-111416) (gh-111419)
pythongh-111342: fix typo in math.sumprod (pythonGH-111416)
pythongh-111342: fix typo in math.sumprod (pythonGH-111416)
pythongh-111342: fix typo in math.sumprod (pythonGH-111416)