diff options
author | Jörn Hees <joernhees@users.noreply.github.com> | 2015-06-22 18:57:21 +0200 |
---|---|---|
committer | Jörn Hees <joernhees@users.noreply.github.com> | 2015-06-22 18:57:21 +0200 |
commit | 56248dfc7fb4b597308af393382de34aa6e406a7 (patch) | |
tree | d827203814611fcb00aa41655d494211acde58d9 | |
parent | fe3fa522b48e787fa87dc1156e1a10bd6671b62c (diff) | |
parent | 7e2397b1c0b588cfa84013218087101cd8c65785 (diff) | |
download | rdflib-56248dfc7fb4b597308af393382de34aa6e406a7.tar.gz |
Merge pull request #488 from joernhees/fix_variable_repr
Variable.__repr__ should return a python representation string, not n3
-rw-r--r-- | rdflib/term.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rdflib/term.py b/rdflib/term.py index 285bdeb9..91cc06ea 100644 --- a/rdflib/term.py +++ b/rdflib/term.py @@ -1527,7 +1527,12 @@ class Variable(Identifier): return unicode.__new__(cls, value) def __repr__(self): - return self.n3() + if self.__class__ is Variable: + clsName = "rdflib.term.Variable" + else: + clsName = self.__class__.__name__ + + return """%s(%s)""" % (clsName, super(Variable, self).__repr__()) def toPython(self): return "?%s" % self |