[Python-modules-commits] [python-pyld] 109/276: Do not consider any two @lists equal.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:47:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-pyld.
commit 9e48b64a81503a1d9a1ae804ed710c41d6ccaf25
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Sat Apr 6 00:15:50 2013 -0400
Do not consider any two @lists equal.
---
lib/pyld/jsonld.py | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 2c4d99e..dfc9d1a 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -961,8 +961,7 @@ class JsonLdProcessor:
1. They are both primitives of the same type and value.
2. They are both @values with the same @value, @type, @language,
and @index, OR
- 3. They are both @lists with the same @list and @index, OR
- 4. They both have @ids that are the same.
+ 3. They both have @ids that are the same.
:param v1: the first value.
:param v2: the second value.
@@ -989,20 +988,7 @@ class JsonLdProcessor:
return type1 == type2
return True
- # 3. equal @lists
- if _is_list(v1) and _is_list(v2):
- if v1.get('@index') != v2.get('@index'):
- return False
- list1 = v1['@list']
- list2 = v2['@list']
- if len(list1) != len(list2):
- return False
- for i in range(len(list1)):
- if not JsonLdProcessor.compare_values(list1[i], list2[i]):
- return False
- return True
-
- # 4. equal @ids
+ # 3. equal @ids
if (_is_object(v1) and '@id' in v1 and
_is_object(v2) and '@id' in v2):
return v1['@id'] == v2['@id']
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git
More information about the Python-modules-commits
mailing list