From a27838d325d5affa13d0cdf8db456ab97364e5fa Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Thu, 21 Dec 2017 01:23:31 +0530 Subject: [PATCH] bpo-32321: reduce is guaranteed to be implemented in _functools, so no need to use ImportError guard --- Lib/functools.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Lib/functools.py b/Lib/functools.py index c8b79c2a7c2bd19..6aa7f4d6cc2b815 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -13,10 +13,7 @@ 'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial', 'partialmethod', 'singledispatch'] -try: - from _functools import reduce -except ImportError: - pass +from _functools import reduce from abc import get_cache_token from collections import namedtuple # import types, weakref # Deferred to single_dispatch()