diff options
| author | Stefan Kögl <stefan@skoegl.net> | 2013-07-12 16:16:15 +0200 |
|---|---|---|
| committer | Stefan Kögl <stefan@skoegl.net> | 2013-07-12 16:16:15 +0200 |
| commit | c6a90a623357efe85f28eca681eb0b7bf21520b8 (patch) | |
| tree | 7702edb9b746e3a0ccf883a91548ebffe6746bcc /jsonpatch.py | |
| parent | 99fe0437ba24cfd40e4129f788d8fa6231ba90ed (diff) | |
| download | python-json-patch-c6a90a623357efe85f28eca681eb0b7bf21520b8.tar.gz | |
simplify equality comparison
Diffstat (limited to 'jsonpatch.py')
| -rw-r--r-- | jsonpatch.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/jsonpatch.py b/jsonpatch.py index 5d74f48..59b9016 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -203,10 +203,8 @@ class JsonPatch(object): if not isinstance(other, JsonPatch): return False - if len(self._ops) != len(other._ops): - return False - - return all(map(operator.eq, self._ops, other._ops)) + return len(self._ops) == len(other._ops) and \ + all(map(operator.eq, self._ops, other._ops)) @classmethod |
