gjhiggins/rdflib — Issue #177: toPython() returns Literal instead of string/unicode for typed string literals
Author: gjhiggins
Created: 2011-10-19 01:35:55+00:00
State: open

Originally filed by bernhard...@gmail.com on 2011-08-08T13:17:27

What steps will reproduce the problem?
>>> from rdflib.term import Literal
>>> l=Literal('foobar')
>>> l.toPython().__class__

>>> from rdflib.namespace import XSD
>>> l2=Literal('foobar', datatype=XSD.string)
>>> l2.toPython().__class__

What is the expected output? What do you see instead?
Expected output would be a string or unicode object.

What version of the product are you using? On what operating system?
rdflib revision 37d3cbfff340

Please provide any additional information below.