From 8aa81e8599eb59532cafc5432b99a8fb39e303bb Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 7 Apr 2016 17:02:29 +0200 Subject: Always return a string in prolog.util.Token.__str__ --- prolog/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prolog') 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. -- cgit v1.2.1