@@ -1302,22 +1302,6 @@ These are not used in annotations. They are building blocks for creating generic
13021302
13031303 c = concatenate('one', b'two') # error: type variable 'A' can be either str or bytes in a function call, but not both
13041304
1305- If a generic type is commonly generic over just one type you can use
1306- ``default `` to specify this type::
1307-
1308- T = TypeVar("T", default=int)
1309-
1310- class Box(Generic[T]):
1311- def __init__(self, value: T | None = None):
1312- self.value = value
1313-
1314- reveal_type(Box()) # type is Box[int]
1315- reveal_type(Box(value="Hello World!")) # type is Box[str]
1316-
1317- A TypeVar without a default cannot follow a TypeVar with a default.
1318-
1319- .. TODO add more about this
1320-
13211305 At runtime, ``isinstance(x, T) `` will raise :exc: `TypeError `. In general,
13221306 :func: `isinstance ` and :func: `issubclass ` should not be used with types.
13231307
@@ -1421,8 +1405,6 @@ These are not used in annotations. They are building blocks for creating generic
14211405
14221406 See :pep: `646 ` for more details on type variable tuples.
14231407
1424- .. TODO docs on default
1425-
14261408 .. versionadded :: 3.11
14271409
14281410.. data :: Unpack
@@ -1468,7 +1450,7 @@ These are not used in annotations. They are building blocks for creating generic
14681450
14691451 .. versionadded :: 3.11
14701452
1471- .. class :: ParamSpec(name, *, bound=None, default=..., covariant=False, contravariant=False)
1453+ .. class :: ParamSpec(name, *, bound=None covariant=False, contravariant=False)
14721454
14731455 Parameter specification variable. A specialized version of
14741456 :class: `type variables <TypeVar> `.
0 commit comments