mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
docs(typing): harmonize "See PEP x for more details" (#97927)
This commit is contained in:
parent
b7dd2cad18
commit
02389658a4
1 changed files with 8 additions and 10 deletions
|
@ -248,7 +248,7 @@ respectively.
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
.. versionchanged:: 3.10
|
||||||
``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`.
|
``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`.
|
||||||
See :pep:`612` for more information.
|
See :pep:`612` for more details.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
The documentation for :class:`ParamSpec` and :class:`Concatenate` provides
|
The documentation for :class:`ParamSpec` and :class:`Concatenate` provides
|
||||||
|
@ -723,7 +723,7 @@ These can be used as types in annotations and do not support ``[]``.
|
||||||
of the ``cls`` parameter.
|
of the ``cls`` parameter.
|
||||||
- Annotating an :meth:`~object.__enter__` method which returns self.
|
- Annotating an :meth:`~object.__enter__` method which returns self.
|
||||||
|
|
||||||
For more information, see :pep:`673`.
|
See :pep:`673` for more details.
|
||||||
|
|
||||||
.. versionadded:: 3.11
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
|
@ -854,7 +854,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
|
||||||
|
|
||||||
.. versionchanged:: 3.10
|
.. versionchanged:: 3.10
|
||||||
``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`.
|
``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`.
|
||||||
See :pep:`612` for more information.
|
See :pep:`612` for more details.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
The documentation for :class:`ParamSpec` and :class:`Concatenate` provide
|
The documentation for :class:`ParamSpec` and :class:`Concatenate` provide
|
||||||
|
@ -1040,8 +1040,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
|
||||||
Special typing constructs that mark individual keys of a :class:`TypedDict`
|
Special typing constructs that mark individual keys of a :class:`TypedDict`
|
||||||
as either required or non-required respectively.
|
as either required or non-required respectively.
|
||||||
|
|
||||||
For more information, see :class:`TypedDict` and
|
See :class:`TypedDict` and :pep:`655` for more details.
|
||||||
:pep:`655` ("Marking individual TypedDict items as required or potentially missing").
|
|
||||||
|
|
||||||
.. versionadded:: 3.11
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
|
@ -1192,8 +1191,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
|
||||||
is not a subtype of the former, since ``list`` is invariant.
|
is not a subtype of the former, since ``list`` is invariant.
|
||||||
The responsibility of writing type-safe type guards is left to the user.
|
The responsibility of writing type-safe type guards is left to the user.
|
||||||
|
|
||||||
``TypeGuard`` also works with type variables. For more information, see
|
``TypeGuard`` also works with type variables. See :pep:`647` for more details.
|
||||||
:pep:`647` (User-Defined Type Guards).
|
|
||||||
|
|
||||||
.. versionadded:: 3.10
|
.. versionadded:: 3.10
|
||||||
|
|
||||||
|
@ -1393,7 +1391,7 @@ These are not used in annotations. They are building blocks for creating generic
|
||||||
to ``call_soon`` match the types of the (positional) arguments of
|
to ``call_soon`` match the types of the (positional) arguments of
|
||||||
``callback``.
|
``callback``.
|
||||||
|
|
||||||
For more details on type variable tuples, see :pep:`646`.
|
See :pep:`646` for more details on type variable tuples.
|
||||||
|
|
||||||
.. versionadded:: 3.11
|
.. versionadded:: 3.11
|
||||||
|
|
||||||
|
@ -1556,7 +1554,7 @@ These are not used in annotations. They are building blocks for creating generic
|
||||||
|
|
||||||
func(C()) # Passes static type check
|
func(C()) # Passes static type check
|
||||||
|
|
||||||
See :pep:`544` for details. Protocol classes decorated with
|
See :pep:`544` for more details. Protocol classes decorated with
|
||||||
:func:`runtime_checkable` (described later) act as simple-minded runtime
|
:func:`runtime_checkable` (described later) act as simple-minded runtime
|
||||||
protocols that check only the presence of given attributes, ignoring their
|
protocols that check only the presence of given attributes, ignoring their
|
||||||
type signatures.
|
type signatures.
|
||||||
|
@ -2632,7 +2630,7 @@ Functions and decorators
|
||||||
def process(response):
|
def process(response):
|
||||||
<actual implementation>
|
<actual implementation>
|
||||||
|
|
||||||
See :pep:`484` for details and comparison with other typing semantics.
|
See :pep:`484` for more details and comparison with other typing semantics.
|
||||||
|
|
||||||
.. versionchanged:: 3.11
|
.. versionchanged:: 3.11
|
||||||
Overloaded functions can now be introspected at runtime using
|
Overloaded functions can now be introspected at runtime using
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue