fix typos in PEP 635 (#1746)
This commit is contained in:
parent
08f7e0e699
commit
66d56bcf3f
|
@ -139,10 +139,10 @@ a JSON data structure using ``match``::
|
||||||
match json_pet:
|
match json_pet:
|
||||||
case {"type": "cat", "name": name, "pattern": pattern}:
|
case {"type": "cat", "name": name, "pattern": pattern}:
|
||||||
return Cat(name, pattern)
|
return Cat(name, pattern)
|
||||||
case {"type": "dog", "name": name, "breed": breed):
|
case {"type": "dog", "name": name, "breed": breed}:
|
||||||
return Dog(name, breed)
|
return Dog(name, breed)
|
||||||
case _:
|
case _:
|
||||||
raise ValueError("Not an suitable pet")
|
raise ValueError("Not a suitable pet")
|
||||||
|
|
||||||
Functional programming generally prefers a declarative style with a focus
|
Functional programming generally prefers a declarative style with a focus
|
||||||
on relationships in data. Side effects are avoided whenever possible.
|
on relationships in data. Side effects are avoided whenever possible.
|
||||||
|
|
Loading…
Reference in New Issue