PEP-705: Fix typo (#3061)
This commit is contained in:
parent
11226bad64
commit
45ef002422
|
@ -24,7 +24,7 @@ This PEP proposes a type constructor ``typing.TypedMapping`` to support this use
|
|||
Motivation
|
||||
==========
|
||||
|
||||
Representing structured data using (potentially nested) dictionaries with string keys is a common pattern in Python programs. :pep:`589` allows these values to be type checked when the exact type is known up-front, but it is hard to write read-only code code that accepts more specific variants: for instance, where fields may be subtypes or restrict a union of possible types. This is an especially common issue when writing APIs for services, which may support a wide range of input structures, and typically do not need to modify their input.
|
||||
Representing structured data using (potentially nested) dictionaries with string keys is a common pattern in Python programs. :pep:`589` allows these values to be type checked when the exact type is known up-front, but it is hard to write read-only code that accepts more specific variants: for instance, where fields may be subtypes or restrict a union of possible types. This is an especially common issue when writing APIs for services, which may support a wide range of input structures, and typically do not need to modify their input.
|
||||
|
||||
For illustration, we will try to add type hints to a function ``movie_string``::
|
||||
|
||||
|
|
Loading…
Reference in New Issue