Last active
August 29, 2015 14:02
-
-
Save fleaplus/d62e9f2579b7b9d5f535 to your computer and use it in GitHub Desktop.
Is this a good idea?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def filter_timezones(timezone_groups): | |
import re | |
exclude = [ | |
'Etc', 'localtime', 'posix', | |
'posixrules', 'right', 'SystemV', | |
] | |
tab_files_re = '.*\\.tab$' | |
def is_kept(zone): | |
return zone not in exclude and not re.match(tab_files_re, zone) | |
return [( group[0], filter(is_kept, group[1]) ) for group in timezone_groups] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
comprehensions are cool, but is this going too far?