diff options
-rw-r--r-- | rdflib/graph.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rdflib/graph.py b/rdflib/graph.py index 68339eba..61a505fa 100644 --- a/rdflib/graph.py +++ b/rdflib/graph.py @@ -1625,9 +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) + + graphs = contexts def quads(self, quad): for s, p, o, c in super(Dataset, self).quads(quad): @@ -1636,7 +1639,6 @@ class Dataset(ConjunctiveGraph): else: yield (s, p, o, c.identifier) - class QuotedGraph(Graph): """ Quoted Graphs are intended to implement Notation 3 formulae. They are |