◐ Shell
clean mode source ↗

bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant by vstinner · Pull Request #26391 · python/cpython

Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside
loops in functions:

* math.comb()
* math.gcd()
* math.lcm()
* math.perm()

erlend-aasland

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

May 26, 2021
…GH-26391)

Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside
loops in functions:

* math.comb()
* math.gcd()
* math.lcm()
* math.perm()
(cherry picked from commit 3e7ee02)

Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner added a commit that referenced this pull request

May 26, 2021
…) (GH-26393)

Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside
loops in functions:

* math.comb()
* math.gcd()
* math.lcm()
* math.perm()
(cherry picked from commit 3e7ee02)

Co-authored-by: Victor Stinner <vstinner@python.org>