summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2021-04-27 14:31:04 (GMT)
committerGitHub <noreply@github.com>2021-04-27 14:31:04 (GMT)
commit05ab4b60ab3dae61ee75692b6624537d4f3fdf85 (patch)
treeca79d746064f5c352b712b5bc66d8c0322d51e84 /Doc/whatsnew
parentd92513390a1a0da781bb08c284136f4d7abea36d (diff)
downloadcpython-05ab4b60ab3dae61ee75692b6624537d4f3fdf85.zip
cpython-05ab4b60ab3dae61ee75692b6624537d4f3fdf85.tar.gz
cpython-05ab4b60ab3dae61ee75692b6624537d4f3fdf85.tar.bz2
bpo-43766: Implement PEP 647 (User-Defined Type Guards) in typing.py (#25282)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.10.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 91ad8ec..eeb0c29 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -743,6 +743,16 @@ See :pep:`613` for more details.
(Contributed by Mikhail Golubev in :issue:`41923`.)
+PEP 647: User-Defined Type Guards
+---------------------------------
+
+:data:`TypeGuard` has been added to the :mod:`typing` module to annotate
+type guard functions and improve information provided to static type checkers
+during type narrowing. For more information, please see :data:`TypeGuard`\ 's
+documentation, and :pep:`647`.
+
+(Contributed by Ken Jin and Guido van Rossum in :issue:`43766`.
+PEP written by Eric Traut.)
Other Language Changes
======================