def __init__(self, value, lang='', datatype=''): if normalize and value: if not isinstance(value, unicode): value = unicode(value) if value != normalize("NFC", value): raise Error("value must be in NFC normalized form.") if datatype: lang = '' self.language = lang self.datatype = datatype
def path(self, node, position, newline=False): if not (self.p_squared(node, position, newline) or self.p_default(node, position, newline)): raise Error("Cannot serialize node '%s'" % (node, ))
def __init__(self,msg): Error.__init__(self, ("SPARQL Error: %s." % msg))
def __init__(self, msg): Error.__init__(self, ("SPARQL Error: %s." % msg))