This module defines the different types of terms...
RDF Literal: http://www.w3.org/TR/rdf-concepts/#section-Graph-Literal
>>> Literal(1).toPython()
1L
>>> cmp(Literal("adsf"), 1)
1
>>> from rdflib.namespace import _XSD_NS
>>> lit2006 = Literal('2006-01-01',datatype=_XSD_NS.date)
>>> lit2006.toPython()
datetime.date(2006, 1, 1)
>>> lit2006 < Literal('2007-01-01',datatype=_XSD_NS.date)
True
>>> Literal(datetime.utcnow()).datatype
rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#dateTime')
>>> oneInt = Literal(1)
>>> twoInt = Literal(2)
>>> twoInt < oneInt
False
>>> Literal('1') < Literal(1)
False
>>> Literal('1') < Literal('1')
False
>>> Literal(1) < Literal('1')
True
>>> Literal(1) < Literal(2.0)
True
>>> Literal(1) < URIRef('foo')
True
>>> Literal(1) < 2.0
True
>>> Literal(1) < object
True
>>> lit2006 < "2007"
True
>>> "2005" < lit2006
True