summaryrefslogtreecommitdiff
path: root/prolog
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-07 17:02:29 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2016-04-07 17:02:29 +0200
commit8aa81e8599eb59532cafc5432b99a8fb39e303bb (patch)
tree7134fa2d5560bdf845812548a8edf65d049b5b06 /prolog
parent3a9568e28c88dd5bfcba7e77d058359ed1a5b827 (diff)
Always return a string in prolog.util.Token.__str__
Diffstat (limited to 'prolog')
-rw-r--r--prolog/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/prolog/util.py b/prolog/util.py
index c0f1ef5..644080d 100644
--- a/prolog/util.py
+++ b/prolog/util.py
@@ -28,7 +28,7 @@ class Token(namedtuple('Token', ['type', 'val', 'pos'])):
return super(Token, cls).__new__(cls, type, val, pos)
def __str__(self):
- return self.val
+ return str(self.val)
# Only consider type and value when comparing tokens. There is probably a
# cleaner way of doing this.