Skip to content

Commit

Permalink
replace map() with list comprehensions
Browse files Browse the repository at this point in the history
list comprehensions is faster than map()
  • Loading branch information
nasa9084 committed Oct 1, 2016
1 parent ca4a426 commit 89340c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache.py
Expand Up @@ -51,7 +51,7 @@ def server_str(server):
if not servers:
raise Exception("servers missing in memcache settings")
else:
server_settings = map( server_str, servers )
server_settings = [server_str(server) for server in servers]
self.client = memcache.Client(server_settings, debug)

def set(self, key, val, expires=0):
Expand Down

0 comments on commit 89340c4

Please sign in to comment.