It is quite common for us to take property values from an RDF graph and do
further things with them in native python data structures. I wonder why there
is no toPython() method for URIRef and BNode objects -- it would be very
convenient if we could just call toPython() and do not care what the underlying
RDF node actually is. Currently we have to check if it's actually a Literal
before calling toPython().
For URIRef the implementation is straightforward -- it should return the
reference itself:
def toPython():
return unicode(self)
Not sure about BNode, though.
Original issue reported on code.google.com by bernhard...@gmail.com on 11 Sep 2011 at 9:48
Original issue reported on code.google.com by
bernhard...@gmail.com
on 11 Sep 2011 at 9:48