summaryrefslogtreecommitdiff
path: root/sqlparse/sql.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlparse/sql.py')
-rw-r--r--sqlparse/sql.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sqlparse/sql.py b/sqlparse/sql.py
index ddb85a1..1bc6b08 100644
--- a/sqlparse/sql.py
+++ b/sqlparse/sql.py
@@ -437,10 +437,11 @@ class IdentifierList(TokenList):
def get_identifiers(self):
"""Returns the identifiers.
- Whitespaces and punctuations are not included in this list.
+ Whitespaces and punctuations are not included in this generator.
"""
- return [x for x in self.tokens
- if not x.is_whitespace() and not x.match(T.Punctuation, ',')]
+ for x in self.tokens:
+ if not x.is_whitespace() and not x.match(T.Punctuation, ','):
+ yield x
class Parenthesis(TokenList):