summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-09-22 12:57:22 (GMT)
committerGitHub <noreply@github.com>2023-09-22 12:57:22 (GMT)
commit92f2e33ebceaf013031d9d96c814df3d702eabf8 (patch)
treeb765f41d1f0dec8474336d62a0b6d738d9cdef7f /Doc
parent6c8cbb3a7c272d7e108803a493fe530f97c28475 (diff)
downloadcpython-92f2e33ebceaf013031d9d96c814df3d702eabf8.zip
cpython-92f2e33ebceaf013031d9d96c814df3d702eabf8.tar.gz
cpython-92f2e33ebceaf013031d9d96c814df3d702eabf8.tar.bz2
[3.12] GH-109190: Copyedit 3.12 What's New: Typing PEPs (GH-109659) (#109684)
(cherry picked from commit 11636788da9e5e64ceef2ac80df330e8170a8d08) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/3.12.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 7f024f6..ed03c0c 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -332,7 +332,7 @@ See :mod:`sys.monitoring` for details.
New Features Related to Type Hints
==================================
-This section covers major changes affecting :pep:`484` type hints and
+This section covers major changes affecting :pep:`type hints <484>` and
the :mod:`typing` module.
.. _whatsnew312-pep692:
@@ -344,7 +344,7 @@ Typing ``**kwargs`` in a function signature as introduced by :pep:`484` allowed
for valid annotations only in cases where all of the ``**kwargs`` were of the
same type.
-This PEP specifies a more precise way of typing ``**kwargs`` by relying on
+:pep:`692` specifies a more precise way of typing ``**kwargs`` by relying on
typed dictionaries::
from typing import TypedDict, Unpack
@@ -388,6 +388,8 @@ Example::
def get_colour(self) -> str:
return "red"
+See :pep:`698` for more details.
+
(Contributed by Steven Troxler in :gh:`101561`.)
.. _whatsnew312-pep695:
@@ -433,8 +435,8 @@ parameters with bounds or constraints::
The value of type aliases and the bound and constraints of type variables
created through this syntax are evaluated only on demand (see
-:ref:`lazy-evaluation`). This means type aliases are able to refer to other
-types defined later in the file.
+:ref:`lazy evaluation <lazy-evaluation>`). This means type aliases are able to
+refer to other types defined later in the file.
Type parameters declared through a type parameter list are visible within the
scope of the declaration and any nested scopes, but not in the outer scope. For