Skip to content

Commit 6d5b09c

Browse files
committed
more tweaks
1 parent 086c6a6 commit 6d5b09c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Doc/library/typing.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ These can be used as types in annotations. They all support subscription using
12951295
:data:`ClassVar` is not a class itself, and cannot
12961296
be used with :func:`isinstance` or :func:`issubclass`.
12971297
:data:`ClassVar` does not change Python runtime behavior, but
1298-
it can be used by third-party type checkers. For example, a type checker
1298+
it can be used by static type checkers. For example, a type checker
12991299
might flag the following code as an error::
13001300

13011301
enterprise_d = Starship(3000)
@@ -1365,7 +1365,7 @@ These can be used as types in annotations. They all support subscription using
13651365

13661366
def mutate_movie(m: Movie) -> None:
13671367
m["year"] = 1999 # allowed
1368-
m["title"] = "The Matrix" # typechecker error
1368+
m["title"] = "The Matrix" # type checker error
13691369

13701370
There is no runtime checking for this property.
13711371

@@ -2535,7 +2535,7 @@ types.
25352535

25362536
Helper class to create low-overhead :ref:`distinct types <distinct>`.
25372537

2538-
A ``NewType`` is considered a distinct type by a typechecker. At runtime,
2538+
A ``NewType`` is considered a distinct type by a type checker. At runtime,
25392539
however, calling a ``NewType`` returns its argument unchanged.
25402540

25412541
Usage::
@@ -2898,7 +2898,7 @@ types.
28982898

28992899
For backwards compatibility with Python 3.10 and below,
29002900
it is also possible to use inheritance to declare both required and
2901-
non-required keys in the same ``TypedDict`` . This is done by declaring a
2901+
non-required keys in the same ``TypedDict``. This is done by declaring a
29022902
``TypedDict`` with one value for the ``total`` argument and then
29032903
inheriting from it in another ``TypedDict`` with a different value for
29042904
``total``:
@@ -3763,7 +3763,7 @@ Constant
37633763

37643764
.. data:: TYPE_CHECKING
37653765

3766-
A special constant that is assumed to be ``True`` by 3rd party static
3766+
A special constant that is assumed to be ``True`` by static
37673767
type checkers. It's ``False`` at runtime.
37683768

37693769
A module which is expensive to import, and which only contain types

Lib/typing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,7 @@ class Disjoint3(Disjoint1, Disjoint2): pass # Type checker error
28102810
V_co = TypeVar('V_co', covariant=True) # Any type covariant containers.
28112811
VT_co = TypeVar('VT_co', covariant=True) # Value type covariant containers.
28122812
T_contra = TypeVar('T_contra', contravariant=True) # Ditto contravariant.
2813-
# Internal type variable used for Type[].
2813+
# Internal type bound to class object types.
28142814
CT_co = TypeVar('CT_co', covariant=True, bound=type)
28152815

28162816

@@ -3403,7 +3403,7 @@ class Movie(TypedDict, total=False):
34033403
year: int
34043404
34053405
m = Movie(
3406-
title='The Matrix', # typechecker error if key is omitted
3406+
title='The Matrix', # type checker error if key is omitted
34073407
year=1999,
34083408
)
34093409
@@ -3425,7 +3425,7 @@ class Movie(TypedDict):
34253425
year: NotRequired[int]
34263426
34273427
m = Movie(
3428-
title='The Matrix', # typechecker error if key is omitted
3428+
title='The Matrix', # type checker error if key is omitted
34293429
year=1999,
34303430
)
34313431
"""
@@ -3445,7 +3445,7 @@ class Movie(TypedDict):
34453445
34463446
def mutate_movie(m: Movie) -> None:
34473447
m["year"] = 1992 # allowed
3448-
m["title"] = "The Matrix" # typechecker error
3448+
m["title"] = "The Matrix" # type checker error
34493449
34503450
There is no runtime checking for this property.
34513451
"""

0 commit comments

Comments
 (0)