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

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]