Skip to content

Commit 3bb3351

Browse files
committed
Explain the call to _get_operation in __init__.
1 parent b44e7a2 commit 3bb3351

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jsonpatch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ def __init__(self, patch):
222222
'copy': CopyOperation,
223223
}
224224

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

0 commit comments

Comments
 (0)