def use_Alt_lexical_conversions(): """ Registering the datatypes item for RDFLib, ie, bind the dictionary values. The 'bind' method of RDFLib adds extra datatypes to the registered ones in RDFLib, though the table used here (I.e., :py:data:`.AltXSDToPYTHON`) actually overrides all of the default conversion routines. The method also add a Decimal entry to the :code:`PythonToXSD` list of RDFLib. """ _toPythonMapping.update(AltXSDToPYTHON)
def use_Alt_lexical_conversions() : """Registering the datatypes item for RDFLib, ie, bind the dictionary values. The 'bind' method of RDFLib adds extra datatypes to the registered ones in RDFLib, though the table used here (ie, L{AltXSDToPYTHON}) actually overrides all of the default conversion routines. The method also add a Decimal entry to the PythonToXSD array of RDFLib. """ _toPythonMapping.update(AltXSDToPYTHON) if Decimal_available : # at some point in type, this structure has changed in rdflib... import types if isinstance(_PythonToXSD,types.DictType) : _PythonToXSD[Decimal] = (None,ns_xsd[u'decimal']) else : _PythonToXSD.append((Decimal,(None,ns_xsd[u'decimal'])))
def use_RDFLib_lexical_conversions(): """ Restore the original (ie, RDFLib) set of lexical conversion routines. """ _toPythonMapping.update(XSDToPython)