Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Imported reduce from functools for forward compatibility.

In Python 3, reduce has to be imported from functools.
  • Loading branch information...
commit 35e65855680be2c8a495ec926c7eaf992c79edc0 1 parent 4b58e94
Claude Paroz claudep authored
1  django/contrib/admin/views/main.py
View
@@ -1,4 +1,5 @@
import operator
+from functools import reduce
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
from django.core.paginator import InvalidPage
1  django/core/exceptions.py
View
@@ -1,6 +1,7 @@
"""
Global Django exception and warning classes.
"""
+from functools import reduce
class DjangoRuntimeWarning(RuntimeWarning):
pass
1  django/utils/crypto.py
View
@@ -8,6 +8,7 @@
import binascii
import operator
import time
+from functools import reduce
# Use the system PRNG if possible
import random
Please sign in to comment.
Something went wrong with that request. Please try again.