fix typos in PEP 635 (#1746)

This commit is contained in:
Patrick Reader 2020-12-24 14:17:26 +00:00 committed by GitHub
parent 08f7e0e699
commit 66d56bcf3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -139,10 +139,10 @@ a JSON data structure using ``match``::
match json_pet:
case {"type": "cat", "name": name, "pattern": pattern}:
return Cat(name, pattern)
case {"type": "dog", "name": name, "breed": breed):
case {"type": "dog", "name": name, "breed": breed}:
return Dog(name, breed)
case _:
raise ValueError("Not an suitable pet")
raise ValueError("Not a suitable pet")
Functional programming generally prefers a declarative style with a focus
on relationships in data. Side effects are avoided whenever possible.