Skip to content

Commit ddbd481

Browse files
committed
Merge remote-tracking branch 'upstream/3.11' into 3.11
2 parents 5103df4 + 039f303 commit ddbd481

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

Doc/library/string.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ See also the :ref:`formatspec` section.
227227

228228
The *field_name* itself begins with an *arg_name* that is either a number or a
229229
keyword. If it's a number, it refers to a positional argument, and if it's a keyword,
230-
it refers to a named keyword argument. If the numerical arg_names in a format string
230+
it refers to a named keyword argument. An *arg_name* is treated as a number if
231+
a call to :meth:`str.isdecimal` on the string would return true.
232+
If the numerical arg_names in a format string
231233
are 0, 1, 2, ... in sequence, they can all be omitted (not just some)
232234
and the numbers 0, 1, 2, ... will be automatically inserted in that order.
233235
Because *arg_name* is not quote-delimited, it is not possible to specify arbitrary

Doc/library/typing.rst

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ Relevant PEPs
5959

6060
Since the initial introduction of type hints in :pep:`484` and :pep:`483`, a
6161
number of PEPs have modified and enhanced Python's framework for type
62-
annotations. These include:
62+
annotations:
63+
64+
.. raw:: html
65+
66+
<details>
67+
<summary><a style="cursor:pointer;">The full list of PEPs</a></summary>
6368

6469
* :pep:`526`: Syntax for Variable Annotations
6570
*Introducing* syntax for annotating variables outside of function
@@ -99,6 +104,11 @@ annotations. These include:
99104
* :pep:`681`: Data Class Transforms
100105
*Introducing* the :func:`@dataclass_transform<dataclass_transform>` decorator
101106

107+
.. raw:: html
108+
109+
</details>
110+
<br>
111+
102112
.. _type-aliases:
103113

104114
Type aliases
@@ -222,9 +232,13 @@ See :pep:`484` for more details.
222232
.. versionadded:: 3.5.2
223233

224234
.. versionchanged:: 3.10
225-
``NewType`` is now a class rather than a function. There is some additional
226-
runtime cost when calling ``NewType`` over a regular function. However, this
227-
cost will be reduced in 3.11.0.
235+
``NewType`` is now a class rather than a function. As a result, there is
236+
some additional runtime cost when calling ``NewType`` over a regular
237+
function.
238+
239+
.. versionchanged:: 3.11
240+
The performance of calling ``NewType`` has been restored to its level in
241+
Python 3.9.
228242

229243

230244
Callable

0 commit comments

Comments
 (0)