PEP 634: Describe how keys are compared in mapping patterns (#1675)
This commit is contained in:
parent
871c59e334
commit
5a65e84863
|
@ -418,7 +418,9 @@ A mapping pattern fails if the subject value is not an instance of
|
|||
``collections.abc.Mapping``.
|
||||
|
||||
A mapping pattern succeeds if every key given in the mapping pattern
|
||||
matches the corresponding item of the subject mapping. If a ``'**'
|
||||
is present in the subject mapping, and the pattern for
|
||||
each key matches the corresponding item of the subject mapping. Keys
|
||||
are always compared with the ``==`` operator. If a ``'**'
|
||||
NAME`` form is present, that name is bound to a ``dict`` containing
|
||||
remaining key-value pairs from the subject mapping.
|
||||
|
||||
|
|
Loading…
Reference in New Issue