Skip to content

Commit

Permalink
Use set comprehension to generate module list
Browse files Browse the repository at this point in the history
set are faster when we need to do item lookup.
  • Loading branch information
copyninja committed Jun 9, 2014
1 parent 63a783f commit 8b91ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions silpa/helper.py
Expand Up @@ -11,8 +11,8 @@ class ModuleConfigHelper(object):

def __new__(cls, *args, **kwargs):
config = kwargs['config']
cls.module_names = [module for module, need in config.items('modules')
if need == 'yes']
cls.module_names = {module for module, need in config.items('modules')
if need == 'yes'}

cls.module_display = {module: display_name for module, display_name in
config.items('module_display')
Expand Down

0 comments on commit 8b91ff7

Please sign in to comment.