@@ -304,7 +304,7 @@ a callable with any arbitrary parameter list would be acceptable:
304304 x = concat # Also OK
305305
306306``Callable `` cannot express complex signatures such as functions that take a
307- variadic number of arguments, :func : `overloaded functions <overload> `, or
307+ variadic number of arguments, :ref : `overloaded functions <overload >`, or
308308functions that have keyword-only parameters. However, these signatures can be
309309expressed by defining a :class: `Protocol ` class with a
310310:meth: `~object.__call__ ` method:
@@ -526,7 +526,7 @@ A user-defined class can be defined as a generic class.
526526 self.logger.info('%s: %s', self.name, message)
527527
528528This syntax indicates that the class ``LoggedVar `` is parameterised around a
529- single :class : `type variable <TypeVar > ` ``T `` . This also makes ``T `` valid as
529+ single :ref : `type variable <typevar >` ``T `` . This also makes ``T `` valid as
530530a type within the class body.
531531
532532Generic classes implicitly inherit from :class: `Generic `. For compatibility
@@ -1483,7 +1483,7 @@ These can be used as types in annotations. They all support subscription using
14831483 Typing operator to conceptually mark an object as having been unpacked.
14841484
14851485 For example, using the unpack operator ``* `` on a
1486- :class : `type variable tuple <TypeVarTuple > ` is equivalent to using ``Unpack ``
1486+ :ref : `type variable tuple <typevartuple >` is equivalent to using ``Unpack ``
14871487 to mark the type variable tuple as having been unpacked::
14881488
14891489 Ts = TypeVarTuple('Ts')
@@ -1574,6 +1574,8 @@ without the dedicated syntax, as documented below.
15741574 ...
15751575 # Etc.
15761576
1577+ .. _typevar :
1578+
15771579.. class :: TypeVar(name, *constraints, bound=None, covariant=False, contravariant=False, infer_variance=False)
15781580
15791581 Type variable.
@@ -1718,9 +1720,11 @@ without the dedicated syntax, as documented below.
17181720 :ref: `type parameter <type-params >` syntax introduced by :pep: `695 `.
17191721 The ``infer_variance `` parameter was added.
17201722
1723+ .. _typevartuple :
1724+
17211725.. class :: TypeVarTuple(name)
17221726
1723- Type variable tuple. A specialized form of :class : `type variable <TypeVar > `
1727+ Type variable tuple. A specialized form of :ref : `type variable <typevar >`
17241728 that enables *variadic * generics.
17251729
17261730 Type variable tuples can be declared in :ref: `type parameter lists <type-params >`
@@ -1838,7 +1842,7 @@ without the dedicated syntax, as documented below.
18381842.. class :: ParamSpec(name, *, bound=None, covariant=False, contravariant=False)
18391843
18401844 Parameter specification variable. A specialized version of
1841- :class : `type variables <TypeVar > `.
1845+ :ref : `type variables <typevar >`.
18421846
18431847 In :ref: `type parameter lists <type-params >`, parameter specifications
18441848 can be declared with two asterisks (``** ``)::
@@ -2749,6 +2753,8 @@ Functions and decorators
27492753
27502754 .. versionadded :: 3.11
27512755
2756+ .. _overload :
2757+
27522758.. decorator :: overload
27532759
27542760 Decorator for creating overloaded functions and methods.
0 commit comments