Imported reduce from functools for forward compatibility.

In Python 3, reduce has to be imported from functools.
This commit is contained in:
Claude Paroz 2012-05-20 00:24:21 +02:00
parent 4b58e94f27
commit 35e6585568
3 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import operator
from functools import reduce
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.core.paginator import InvalidPage

View File

@ -1,6 +1,7 @@
"""
Global Django exception and warning classes.
"""
from functools import reduce
class DjangoRuntimeWarning(RuntimeWarning):
pass

View File

@ -8,6 +8,7 @@ import hashlib
import binascii
import operator
import time
from functools import reduce
# Use the system PRNG if possible
import random