[Python-modules-commits] [python-pyld] 50/276: Do not do @id expansion for @id/@type even if aliased.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:47:52 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 a7e70a994c2e57d3062600384e00e41d1d10afc2
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Wed Jan 11 19:31:23 2012 -0500

    Do not do @id expansion for @id/@type even if aliased.
---
 lib/pyld/jsonld.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 8a94dd8..28d858a 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -12,7 +12,7 @@ JSON-LD.
 .. moduleauthor:: Tim McNamara <tim.mcnamara at okfn.org>
 """
 
-__copyright__ = "Copyright (c) 2011 Digital Bazaar, Inc."
+__copyright__ = "Copyright (c) 2011-2012 Digital Bazaar, Inc."
 __license__ = "New BSD licence"
 
 __all__ = ["compact", "expand", "frame", "normalize", "triples"]
@@ -758,7 +758,8 @@ class Processor:
                     coerce = xsd['integer']
 
             # special-case expand @id and @type (skips '@id' expansion)
-            if property == keywords['@id'] or property == keywords['@type']:
+            if (property == '@id' or property == keywords['@id'] or
+                property == '@type' or property == keywords['@type']):
                 rval = _expandTerm(ctx, value, None)
             # coerce to appropriate type
             elif coerce is not None:

-- 
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