Skip to content

Commit 1c66aca

Browse files
committed
Changed get_sublists() to a generator
1 parent 26b6bad commit 1c66aca

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sqlparse/sql.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ def is_group(self):
175175
return True
176176

177177
def get_sublists(self):
178-
return [x for x in self.tokens if isinstance(x, TokenList)]
178+
# return [x for x in self.tokens if isinstance(x, TokenList)]
179+
for x in self.tokens:
180+
if isinstance(x, TokenList):
181+
yield x
179182

180183
@property
181184
def _groupable_tokens(self):

0 commit comments

Comments
 (0)