'reduce' has been renamed to 'functools.reduce' in Python 3

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Satoshi Kobayashi 2015-04-13 16:32:09 +09:00 committed by FUJITA Tomonori
parent 67e3821c94
commit fad258d458

View File

@ -14,6 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
try:
# Python 3
from functools import reduce
except ImportError:
# Python 2
pass
import sys
import unittest
from nose.tools import eq_