Skip to content

Commit

Permalink
Merge pull request #922 from odanoburu/patch-1
Browse files Browse the repository at this point in the history
method is `predicate_objects`, not `predicates_objects`
  • Loading branch information
nicholascar authored Mar 13, 2020
2 parents 358cd3c + 2625542 commit 0e5efef
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 @@ -71,7 +71,7 @@ This function is a generator of triples that match the pattern given by the argu

bobgraph += g.triples( (bob, None, None) )

If you are not interested in whole triples, you can get only the bits you want with the methods :meth:`~rdflib.graph.Graph.objects`, :meth:`~rdflib.graph.Graph.subjects`, :meth:`~rdflib.graph.Graph.predicates`, :meth:`~rdflib.graph.Graph.predicates_objects`, etc. Each take parameters for the components of the triple to constraint::
If you are not interested in whole triples, you can get only the bits you want with the methods :meth:`~rdflib.graph.Graph.objects`, :meth:`~rdflib.graph.Graph.subjects`, :meth:`~rdflib.graph.Graph.predicates`, :meth:`~rdflib.graph.Graph.predicate_objects`, etc. Each take parameters for the components of the triple to constraint::

for person in g.subjects(RDF.type, FOAF.Person):
print "%s is a person"%person
Expand Down

0 comments on commit 0e5efef

Please sign in to comment.