diff --git a/pep-0635.rst b/pep-0635.rst index cee869227..bf34b22c8 100644 --- a/pep-0635.rst +++ b/pep-0635.rst @@ -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.