PEP 636: Fix mistake caught by @merwok (#1678)
This commit is contained in:
parent
8fba056c41
commit
e52ed7f4df
|
@ -316,10 +316,10 @@ different kinds of objects, and also apply patterns to its attributes::
|
|||
case other_event:
|
||||
raise ValueError(f"Unrecognized event: {other_event}")
|
||||
|
||||
A pattern like ``Click(position=(x, y))`` only matches if the actual event is a subclass of
|
||||
the ``Click`` class. It will also requires that the event has a ``position`` attribute
|
||||
that matches the ``(x, y)`` pattern. If there's a match, the locals ``x`` and ``y`` will
|
||||
get the expected values.
|
||||
A pattern like ``Click(position=(x, y))`` only matches if the the type of the event is
|
||||
a subclass of the ``Click`` class. It will also requires that the event has a ``position``
|
||||
attribute that matches the ``(x, y)`` pattern. If there's a match, the locals ``x`` and
|
||||
``y`` will get the expected values.
|
||||
|
||||
A pattern like ``KeyPress()``, with no arguments will match any object which is an
|
||||
instance of the ``KeyPress`` class. Only the attributes you specify in the pattern are
|
||||
|
|
Loading…
Reference in New Issue