Skip to content

Commit 1198aba

Browse files
committed
Get rid of set comprehension, as this doesn't exist in Python 2.6.
1 parent 9fbfe61 commit 1198aba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

html5lib/trie/_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def keys(self, prefix=None):
1111
if prefix is None:
1212
return set(keys)
1313

14-
return {x for x in keys if x.startswith(prefix)}
14+
# Python 2.6: no set comprehensions
15+
return set([x for x in keys if x.startswith(prefix)])
1516

1617
def has_keys_with_prefix(self, prefix):
1718
for key in self.keys():

0 commit comments

Comments
 (0)