summaryrefslogtreecommitdiff
path: root/rdflib/plugins/sparql/parserutils.py
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2015-11-28 09:08:06 +0100
committerGunnar Aastrand Grimnes <gromgull@gmail.com>2015-11-28 09:08:06 +0100
commit6200934ace658ca05de693956b37623ce3a545eb (patch)
tree3ab65e07cce1f308ed980280ce369865e08f9df8 /rdflib/plugins/sparql/parserutils.py
parentfa4172cc51a39b698ab7cb81240243ed6d62db1c (diff)
downloadrdflib-initbindings-fix.tar.gz
Fix initBindings handling. Fixes #294initbindings-fix
This changes initBinding handling from adding values in the context object, to actually changing the query algebra and inserting a values clause in the right place. This also adds a bunch of tests.
Diffstat (limited to 'rdflib/plugins/sparql/parserutils.py')
-rw-r--r--rdflib/plugins/sparql/parserutils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/rdflib/plugins/sparql/parserutils.py b/rdflib/plugins/sparql/parserutils.py
index 233e88e8..b5c25600 100644
--- a/rdflib/plugins/sparql/parserutils.py
+++ b/rdflib/plugins/sparql/parserutils.py
@@ -147,6 +147,9 @@ class CompValue(OrderedDict):
self.name = name
self.update(values)
+ def clone(self):
+ return CompValue(self.name, **self)
+
def __str__(self):
return self.name + "_" + OrderedDict.__str__(self)