From e1b74d00945ae772300432a51a71e735143c8905 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 23 Jun 2012 07:54:45 -0700 Subject: [PATCH] Don't use a list comprehension when we don't need the resulting list. --- django/dispatch/dispatcher.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py index 8f57b185c3..b935df3c7f 100644 --- a/django/dispatch/dispatcher.py +++ b/django/dispatch/dispatcher.py @@ -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