]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-119189: Fix the power operator for Fraction (GH-119242) (GH-119836)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Jul 2024 07:44:23 +0000 (09:44 +0200)
committerGitHub <noreply@github.com>
Tue, 16 Jul 2024 07:44:23 +0000 (10:44 +0300)
commitd02adecb42137711e8c58aac661fbeb46be4837b
treef038af4c1c847841dc1ff1055f64a15f1767ab16
parent4a62fdf35d11751a57f696ea998c80613453c6e3
[3.13] gh-119189:  Fix the power operator for Fraction (GH-119242) (GH-119836)

When using the ** operator or pow() with Fraction as the base
and an exponent that is not rational, a float, or a complex, the
fraction is no longer converted to a float.
(cherry picked from commit b9965ef282d6662145d2e05b080c811132ce6fde)

Co-authored-by: Joshua Herman <30265+zitterbewegung@users.noreply.github.com>
Lib/fractions.py
Lib/test/test_fractions.py
Misc/ACKS
Misc/NEWS.d/next/Library/2024-05-20-13-48-37.gh-issue-119189.dhJVs5.rst [new file with mode: 0644]