summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdflib/graph.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/rdflib/graph.py b/rdflib/graph.py
index 80f21b60..61a505fa 100644
--- a/rdflib/graph.py
+++ b/rdflib/graph.py
@@ -1625,16 +1625,12 @@ class Dataset(ConjunctiveGraph):
def contexts(self, triple=None):
default = False
for c in super(Dataset, self).contexts(triple):
- default|=c.identifier == DATASET_DEFAULT_GRAPH_ID
+ default |= c.identifier == DATASET_DEFAULT_GRAPH_ID
yield c
- if not default: yield self.graph(DATASET_DEFAULT_GRAPH_ID)
+ if not default:
+ yield self.graph(DATASET_DEFAULT_GRAPH_ID)
- def graphs(self, triple=None) :
- default = False
- for c in super(Dataset, self).contexts(triple):
- default|=c.identifier == DATASET_DEFAULT_GRAPH_ID
- yield c
- if not default: yield self.graph(DATASET_DEFAULT_GRAPH_ID)
+ graphs = contexts
def quads(self, quad):
for s, p, o, c in super(Dataset, self).quads(quad):