Don't use a list comprehension when we don't need the resulting list.

This commit is contained in:
Alex Gaynor 2012-06-23 07:54:45 -07:00
parent d4da08375b
commit e1b74d0094
1 changed files with 2 additions and 1 deletions

View File

@ -270,7 +270,8 @@ def receiver(signal, **kwargs):
"""
def _decorator(func):
if isinstance(signal, (list, tuple)):
[s.connect(func, **kwargs) for s in signal]
for s in signal:
s.connect(func, **kwargs)
else:
signal.connect(func, **kwargs)
return func