/usr/share/pyshared/rdflib/sparql/Unbound.py is in python-rdflib 2.4.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from rdflib.sparql import _questChar
class Unbound :
"""A class to encapsulate a query variable. This class should be used in conjunction with L{BasicGraphPattern<graphPattern.BasicGraphPattern>}."""
def __init__(self,name) :
"""
@param name: the name of the variable (without the '?' character)
@type name: unicode or string
"""
if isinstance(name,basestring) :
self.name = _questChar + name
self.origName = name
else :
raise SPARQLError("illegal argument, variable name must be a string or unicode")
def __repr__(self) :
retval = "?%s" % self.origName
return retval
def __str__(self) :
return self.__repr__()
|