Closed KonradHoeffner closed 1 year ago
That's a valid question (although the methods should then be renamed if they did not return triples anymore...).
There is a value in returning the full triples, though: the term you pass you triples_with_s may not have the same type as the subjects you get back from the graph (the only requirement is that it implements Term
). What the method returns is the term that comes from the graph, with the same type as the other terms of the triples.
Thanks for the clarification!
When I use methods such as
triples_with_s
ortriples_with_po
, I already know one or two of the triple components. Wouldn't it be much more efficient to just return property-object pairs in the first case and a set of subjects in the second?