]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-114014: Update `fractions.Fraction()`'s rational parsing regex (#114015)
authorCrowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Sat, 13 Jan 2024 12:02:39 +0000 (20:02 +0800)
committerGitHub <noreply@github.com>
Sat, 13 Jan 2024 12:02:39 +0000 (12:02 +0000)
commitdd56b5748317c3d504d6a9660d9207620c547f5c
tree62da7311e73f41d4377f6138f9413976a20e371b
parentc7d59bd8cfa053e77ae3446c82afff1fd38a4886
gh-114014: Update `fractions.Fraction()`'s rational parsing regex (#114015)

Fix a bug in the regex used for parsing a string input to the `fractions.Fraction` constructor. That bug led to an inconsistent exception message being given for some inputs.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Lib/fractions.py
Lib/test/test_fractions.py
Misc/NEWS.d/next/Library/2024-01-13-11-34-29.gh-issue-114014.WRHifN.rst [new file with mode: 0644]