Skip to content

Commit

Permalink
Fix comment doesn't describe behavior
Browse files Browse the repository at this point in the history
Comment refers to a person that knows bob and code would return a name, but this would only work if the triple
`person foaf:name bob .`
is part of the dataset. As this is a very uncommon way to model a `foaf:knows` the code was adjusted to match the description.
  • Loading branch information
Kibubu committed Jun 12, 2023
1 parent 4b96e9d commit caed668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/intro_to_graphs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ node, not a generator:
# get any name of bob
name = g.value(bob, FOAF.name)
# get the one person that knows bob and raise an exception if more are found
mbox = g.value(predicate = FOAF.name, object=bob, any=False)
person = g.value(predicate = FOAF.knows, object=bob, any=False)
:class:`~rdflib.graph.Graph` methods for accessing triples
Expand Down

0 comments on commit caed668

Please sign in to comment.