From aeab3f59113fac9681977c2b44851a655d183bf3 Mon Sep 17 00:00:00 2001 From: Brian Crowell Date: Mon, 15 Oct 2012 21:15:25 -0500 Subject: [PATCH] py3k: Import reduce function reduce() is no longer a built-in function in py3k. --- PIL/ImageFilter.py | 2 ++ PIL/ImageOps.py | 1 + PIL/ImageStat.py | 1 + 3 files changed, 4 insertions(+) diff --git a/PIL/ImageFilter.py b/PIL/ImageFilter.py index 6d328cc1a..cfdad5fc5 100644 --- a/PIL/ImageFilter.py +++ b/PIL/ImageFilter.py @@ -15,6 +15,8 @@ # See the README file for information on usage and redistribution. # +from functools import reduce + class Filter: pass diff --git a/PIL/ImageOps.py b/PIL/ImageOps.py index 9825d9ced..de32726a1 100644 --- a/PIL/ImageOps.py +++ b/PIL/ImageOps.py @@ -19,6 +19,7 @@ import Image import operator +from functools import reduce ## # (New in 1.1.3) The ImageOps module contains a number of diff --git a/PIL/ImageStat.py b/PIL/ImageStat.py index 7ab258c1a..c87bd57cb 100644 --- a/PIL/ImageStat.py +++ b/PIL/ImageStat.py @@ -23,6 +23,7 @@ import Image import operator, math +from functools import reduce ## # The ImageStat module calculates global statistics for an