Author: mtredinnick
Date: 2007-07-13 08:15:35 -0500 (Fri, 13 Jul 2007)
New Revision: 5685

Modified:
   django/trunk/django/contrib/localflavor/no/forms.py
Log:
Fixed #4865 -- Replaced a stray generator comprehension with a list
comprehension so that we don't break Python 2.3.


Modified: django/trunk/django/contrib/localflavor/no/forms.py
===================================================================
--- django/trunk/django/contrib/localflavor/no/forms.py 2007-07-13 12:03:20 UTC 
(rev 5684)
+++ django/trunk/django/contrib/localflavor/no/forms.py 2007-07-13 13:15:35 UTC 
(rev 5685)
@@ -1,4 +1,3 @@
-# -*- coding: iso-8859-1 -*-
 """
 Norwegian-specific Form helpers
 """
@@ -66,7 +65,7 @@
         weight_2 = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2, 1]
 
         def multiply_reduce(aval, bval):
-            return sum((a * b) for (a, b) in zip(aval, bval))
+            return sum([(a * b) for (a, b) in zip(aval, bval)])
 
         if multiply_reduce(digits, weight_1) % 11 != 0:
             raise ValidationError(msg)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to