summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Car <nicholas.car@surroundaustralia.com>2021-08-28 18:21:45 +1000
committerGitHub <noreply@github.com>2021-08-28 18:21:45 +1000
commit9c457acada0ea6756e1e050beed053fb3297acc3 (patch)
tree6c264112eeb197e85018a7d0b45ffc03061f2336
parentfb105de52ed022e7660479a858a5812b55fa1cb6 (diff)
downloadrdflib-9c457acada0ea6756e1e050beed053fb3297acc3.tar.gz
tiny tweaks to new and existing doco
-rw-r--r--rdflib/graph.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/rdflib/graph.py b/rdflib/graph.py
index e84d6a01..9f2d84b8 100644
--- a/rdflib/graph.py
+++ b/rdflib/graph.py
@@ -1759,8 +1759,8 @@ class Dataset(ConjunctiveGraph):
rdflib.term.URIRef("http://example.org/y"),
rdflib.term.Literal("bar"))
>>>
- >>> # querying quads return quads; the fourth argument can be unrestricted
- >>> # or restricted to a graph
+ >>> # querying quads() return quads; the fourth argument can be unrestricted
+ >>> # (None) or restricted to a graph
>>> for q in ds.quads((None, None, None, None)): # doctest: +SKIP
... print(q) # doctest: +NORMALIZE_WHITESPACE
(rdflib.term.URIRef("http://example.org/a"),
@@ -1776,7 +1776,7 @@ class Dataset(ConjunctiveGraph):
rdflib.term.Literal("foo-bar"),
rdflib.term.URIRef("http://www.example.com/gr"))
>>>
- >>> # which is equivalent to iterate over the dataset
+ >>> # unrestricted looping is equivalent to iterating over the entire Dataset
>>> for q in ds: # doctest: +SKIP
... print(q) # doctest: +NORMALIZE_WHITESPACE
(rdflib.term.URIRef("http://example.org/a"),
@@ -1792,7 +1792,8 @@ class Dataset(ConjunctiveGraph):
rdflib.term.Literal("foo-bar"),
rdflib.term.URIRef("http://www.example.com/gr"))
>>>
- >>> for q in ds.quads((None,None,None,g)): # doctest: +SKIP
+ >>> # resticting iteration to a graph:
+ >>> for q in ds.quads((None, None, None, g)): # doctest: +SKIP
... print(q) # doctest: +NORMALIZE_WHITESPACE
(rdflib.term.URIRef("http://example.org/x"),
rdflib.term.URIRef("http://example.org/y"),