@@ -290,7 +290,7 @@ a callable with any arbitrary parameter list would be acceptable:
290
290
x = concat # Also OK
291
291
292
292
``Callable `` cannot express complex signatures such as functions that take a
293
- variadic number of arguments, :func : `overloaded functions <overload> `, or
293
+ variadic number of arguments, :ref : `overloaded functions <overload >`, or
294
294
functions that have keyword-only parameters. However, these signatures can be
295
295
expressed by defining a :class: `Protocol ` class with a<
10000
/div>
296
296
:meth: `~object.__call__ ` method:
@@ -1424,7 +1424,7 @@ These can be used as types in annotations. They all support subscription using
1424
1424
Typing operator to conceptually mark an object as having been unpacked.
1425
1425
1426
1426
For example, using the unpack operator ``* `` on a
1427
- :class : `type variable tuple <TypeVarTuple > ` is equivalent to using ``Unpack ``
1427
+ :ref : `type variable tuple <typevartuple >` is equivalent to using ``Unpack ``
1428
1428
to mark the type variable tuple as having been unpacked::
1429
1429
1430
1430
Ts = TypeVarTuple('Ts')
@@ -1479,6 +1479,8 @@ for creating generic types.
1479
1479
except KeyError:
1480
1480
return default
1481
1481
1482
+ .. _typevar :
1483
+
1482
1484
.. class :: TypeVar(name, *constraints, bound=None, covariant=False, contravariant=False)
1483
1485
1484
1486
Type variable.
@@ -1573,9 +1575,11 @@ for creating generic types.
1573
1575
1574
1576
A tuple containing the constraints of the type variable, if any.
1575
1577
1578
+ .. _typevartuple :
1579
+
1576
1580
.. class :: TypeVarTuple(name)
1577
1581
1578
- Type variable tuple. A specialized form of :class : `type variable <TypeVar > `
1582
+ Type variable tuple. A specialized form of :ref : `type variable <typevar >`
1579
1583
that enables *variadic * generics.
1580
1584
1581
1585
Usage::
@@ -1686,7 +1690,7 @@ for creating generic types.
1686
1690
.. class :: ParamSpec(name, *, bound=None, covariant=False, contravariant=False)
1687
1691
1688
1692
Parameter specification variable. A specialized version of
1689
- :class : `type variables <TypeVar > `.
1693
+ :ref : `type variables <typevar >`.
1690
1694
1691
1695
Usage::
1692
1696
@@ -2483,6 +2487,8 @@ Functions and decorators
2483
2487
2484
2488
.. versionadded :: 3.11
2485
2489
2490
+ .. _overload :
2491
+
2486
2492
.. decorator :: overload
2487
2493
2488
2494
Decorator for creating overloaded functions and methods.
0 commit comments