summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Shawley <daveshawley@gmail.com>2020-11-20 07:22:03 -0500
committerDave Shawley <daveshawley@gmail.com>2020-11-20 07:22:03 -0500
commit3bb33518194b0cbc6e1512dbeb2ac5ef548d8c72 (patch)
treebbef56a5885abc1c0315ee3ad9fa3c5789525100
parentb44e7a2031ad5cbe0a0d5ad2ab0763b7b9b8dc25 (diff)
downloadpython-json-patch-3bb33518194b0cbc6e1512dbeb2ac5ef548d8c72.tar.gz
Explain the call to _get_operation in __init__.
-rw-r--r--jsonpatch.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/jsonpatch.py b/jsonpatch.py
index 022972b..2b8678f 100644
--- a/jsonpatch.py
+++ b/jsonpatch.py
@@ -222,6 +222,10 @@ class JsonPatch(object):
'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)