summaryrefslogtreecommitdiff
path: root/rdflib/plugins/sparql/sparql.py
diff options
context:
space:
mode:
Diffstat (limited to 'rdflib/plugins/sparql/sparql.py')
-rw-r--r--rdflib/plugins/sparql/sparql.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/rdflib/plugins/sparql/sparql.py b/rdflib/plugins/sparql/sparql.py
index 76eded8f..69505561 100644
--- a/rdflib/plugins/sparql/sparql.py
+++ b/rdflib/plugins/sparql/sparql.py
@@ -191,13 +191,14 @@ class FrozenBindings(FrozenDict):
bnodes = property(_bnodes)
now = property(_now)
- def forget(self, before):
+ def forget(self, before, _except=None):
"""
return a frozen dict only of bindings made in self
since before
"""
+ if not _except : _except = []
- return FrozenBindings(self.ctx, (x for x in self.iteritems() if before[x[0]] is None))
+ return FrozenBindings(self.ctx, (x for x in self.iteritems() if x[0] in _except or before[x[0]] is None))
def remember(self, these):
"""