From a3ef499262680b0714e774e3d531c25de73a836a Mon Sep 17 00:00:00 2001 From: Right Hand Abacus Date: Tue, 9 Aug 2016 12:51:51 -0400 Subject: [PATCH] Performance improvement on str(tokenlist) --- sqlparse/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlparse/sql.py b/sqlparse/sql.py index 8b530bdf..37aa3bb4 100644 --- a/sqlparse/sql.py +++ b/sqlparse/sql.py @@ -149,7 +149,7 @@ def __init__(self, tokens=None): super(TokenList, self).__init__(None, text_type(self)) def __str__(self): - return ''.join(token.value for token in self.flatten()) + return ''.join(token.value for token in self.tokens) # weird bug # def __len__(self):