Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
micknudsen committed Dec 10, 2023
1 parent 50cbfc8 commit 3d8101b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 2015/12/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ def total(
document: str,
ignore_red: Optional[bool] = False,
) -> int:
"""Calculate the sum of all numbers in a JSON document. Optionally ignore all
dictionary objects (and all their children) if they the contain the value 'red'."""
match data := json.loads(document):
case int():
return data
Expand Down

0 comments on commit 3d8101b

Please sign in to comment.