summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.11.rst
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2021-10-21 22:09:47 (GMT)
committerGitHub <noreply@github.com>2021-10-21 22:09:47 (GMT)
commitd1b24775b462f4f28aa4929fd031899170793388 (patch)
treed1df75e96bb817654f96f38a48b98117e2ab570f /Doc/whatsnew/3.11.rst
parent51375388bee7287be2d942906b48c8cf3f691e8b (diff)
downloadcpython-d1b24775b462f4f28aa4929fd031899170793388.zip
cpython-d1b24775b462f4f28aa4929fd031899170793388.tar.gz
cpython-d1b24775b462f4f28aa4929fd031899170793388.tar.bz2
bpo-44547: Make Fractions objects instances of typing.SupportsInt (GH-27851)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Doc/whatsnew/3.11.rst')
-rw-r--r--Doc/whatsnew/3.11.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 74fc753..a03fff8 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -193,8 +193,12 @@ Improved Modules
fractions
---------
-Support :PEP:`515`-style initialization of :class:`~fractions.Fraction` from
-string. (Contributed by Sergey B Kirpichev in :issue:`44258`.)
+* Support :PEP:`515`-style initialization of :class:`~fractions.Fraction` from
+ string. (Contributed by Sergey B Kirpichev in :issue:`44258`.)
+
+* :class:`~fractions.Fraction` now implements an ``__int__`` method, so
+ that an ``isinstance(some_fraction, typing.SupportsInt)`` check passes.
+ (Contributed by Mark Dickinson in :issue:`44547`.)
math