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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy