Skip to content

Commit

Permalink
Explain the call to _get_operation in __init__.
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-shawley committed Nov 20, 2020
1 parent b44e7a2 commit 3bb3351
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jsonpatch.py
Expand Up @@ -222,6 +222,10 @@ def __init__(self, patch):
'copy': CopyOperation,
}

# Verify that the structure of the patch document
# is correct by retrieving each patch element.
# Much of the validation is done in the initializer
# though some is delayed until the patch is applied.
for op in self.patch:
self._get_operation(op)

Expand Down

0 comments on commit 3bb3351

Please sign in to comment.