py3k: Import reduce function

reduce() is no longer a built-in function in py3k.
This commit is contained in:
Brian Crowell 2012-10-15 21:15:25 -05:00 committed by Brian Crowell
parent da1d715b8e
commit aeab3f5911
3 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,8 @@
# See the README file for information on usage and redistribution. # See the README file for information on usage and redistribution.
# #
from functools import reduce
class Filter: class Filter:
pass pass

View File

@ -19,6 +19,7 @@
import Image import Image
import operator import operator
from functools import reduce
## ##
# (New in 1.1.3) The <b>ImageOps</b> module contains a number of # (New in 1.1.3) The <b>ImageOps</b> module contains a number of

View File

@ -23,6 +23,7 @@
import Image import Image
import operator, math import operator, math
from functools import reduce
## ##
# The <b>ImageStat</b> module calculates global statistics for an # The <b>ImageStat</b> module calculates global statistics for an