PEP 646: Fix typo in the example code (#1808)
This commit is contained in:
parent
604b51399c
commit
1d68240e87
|
@ -401,7 +401,7 @@ each element looking for example like these:
|
||||||
Until now, our patterns have processed sequences, but there are patterns to match
|
Until now, our patterns have processed sequences, but there are patterns to match
|
||||||
mappings based on their present keys. In this case you could use::
|
mappings based on their present keys. In this case you could use::
|
||||||
|
|
||||||
for action in message:
|
for action in actions:
|
||||||
match action:
|
match action:
|
||||||
case {"text": message, "color": c}:
|
case {"text": message, "color": c}:
|
||||||
ui.set_text_color(c)
|
ui.set_text_color(c)
|
||||||
|
@ -437,7 +437,7 @@ are both strings. For many builtin classes (see PEP-634 for the whole list), you
|
||||||
use a positional parameter as a shorthand, writing ``str(c)`` rather than ``str() as c``.
|
use a positional parameter as a shorthand, writing ``str(c)`` rather than ``str() as c``.
|
||||||
The fully rewritten version looks like this::
|
The fully rewritten version looks like this::
|
||||||
|
|
||||||
for action in message:
|
for action in actions:
|
||||||
match action:
|
match action:
|
||||||
case {"text": str(message), "color": str(c)}:
|
case {"text": str(message), "color": str(c)}:
|
||||||
ui.set_text_color(c)
|
ui.set_text_color(c)
|
||||||
|
|
Loading…
Reference in New Issue