Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #4865 -- Replaced a stray generator comprehension with a list

comprehension so that we don't break Python 2.3.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3eb1071b3d3ab21bf98c1b92d5aa0a41c67de13e 1 parent e4bcfc2
Malcolm Tredinnick malcolmt authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  django/contrib/localflavor/no/forms.py
3  django/contrib/localflavor/no/forms.py
View
@@ -1,4 +1,3 @@
-# -*- coding: iso-8859-1 -*-
"""
Norwegian-specific Form helpers
"""
@@ -66,7 +65,7 @@ def clean(self, value):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.