Skip to content

Commit

Permalink
Merge pull request jazzband#252 from jdufresne/generator-expression
Browse files Browse the repository at this point in the history
use generator expression to avoid storing unnecessary list in memory
  • Loading branch information
niwinz authored Apr 20, 2017
2 parents 56afaa9 + 163c899 commit 371dc17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_redis/client/sharded.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def delete_pattern(self, pattern, version=None, client=None, itersize=None):

keys = []
for server, connection in self._serverdict.items():
keys.extend([key for key in connection.scan_iter(**kwargs)])
keys.extend(key for key in connection.scan_iter(**kwargs))

res = 0
if keys:
Expand Down

0 comments on commit 371dc17

Please sign in to comment.