gjhiggins/rdflib — Issue #33: Literal repr mishandles the input kw arg names
Author: gjhiggins
Created: 2011-10-19 01:00:46+00:00
State: open

Originally filed by drewpca on 2008-12-19T06:42:14

>>> Literal('2008-12-18',
datatype=URIRef('http://www.w3.org/2001/XMLSchema#date'))
rdflib.Literal('2008-12-18', language=None,
datatype=rdflib.URIRef('http://www.w3.org/2001/XMLSchema#date'))

The language=None part isn't wrong, but it does make my doctest lines extra
long.

>>> Literal('bonjour', lang='fr')
rdflib.Literal('bonjour', language='fr', datatype=None)

That one is much worse, because the repr does not eval back to the object
(lang vs language). Similarly, I wish it would omit the datatype=None.