mirror of
https://github.com/django/django.git
synced 2024-12-24 18:16:19 +00:00
Imported reduce from functools for forward compatibility.
In Python 3, reduce has to be imported from functools.
This commit is contained in:
parent
4b58e94f27
commit
35e6585568
@ -1,4 +1,5 @@
|
|||||||
import operator
|
import operator
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
|
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
|
||||||
from django.core.paginator import InvalidPage
|
from django.core.paginator import InvalidPage
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""
|
"""
|
||||||
Global Django exception and warning classes.
|
Global Django exception and warning classes.
|
||||||
"""
|
"""
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
class DjangoRuntimeWarning(RuntimeWarning):
|
class DjangoRuntimeWarning(RuntimeWarning):
|
||||||
pass
|
pass
|
||||||
|
@ -8,6 +8,7 @@ import hashlib
|
|||||||
import binascii
|
import binascii
|
||||||
import operator
|
import operator
|
||||||
import time
|
import time
|
||||||
|
from functools import reduce
|
||||||
|
|
||||||
# Use the system PRNG if possible
|
# Use the system PRNG if possible
|
||||||
import random
|
import random
|
||||||
|
Loading…
Reference in New Issue
Block a user