mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Allow whitespace around a slash in fraction string inputs (GH-96496)
This commit is contained in:
parent
91f40f3f78
commit
656167db81
4 changed files with 7 additions and 4 deletions
|
@ -98,6 +98,9 @@ another rational number, or from a string.
|
|||
:class:`Fraction` implements ``__int__`` now to satisfy
|
||||
``typing.SupportsInt`` instance checks.
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
Space is allowed around the slash for string inputs: `Fraction('2 / 3')`.
|
||||
|
||||
.. attribute:: numerator
|
||||
|
||||
Numerator of the Fraction in lowest term.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue