From e52ed7f4df53674e1d9e87adb0f7761034f7ae99 Mon Sep 17 00:00:00 2001 From: Daniel F Moisset Date: Fri, 23 Oct 2020 15:42:51 +0100 Subject: [PATCH] PEP 636: Fix mistake caught by @merwok (#1678) --- pep-0636.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pep-0636.rst b/pep-0636.rst index dc9e9ce18..5e8fc27d0 100644 --- a/pep-0636.rst +++ b/pep-0636.rst @@ -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