PEP 636: Fix mistake caught by @merwok (#1678)

This commit is contained in:
Daniel F Moisset 2020-10-23 15:42:51 +01:00 committed by GitHub
parent 8fba056c41
commit e52ed7f4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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