From be08980377cf2cd0c136e32eb0c644d392e5c7be Mon Sep 17 00:00:00 2001 From: Srinivas Reddy Thatiparthy Date: Sat, 26 Aug 2017 19:59:24 +0530 Subject: MAINT: remove try..except clause. - Generator type has been added to types module in 2.2 we do not need to catch AttributeError --- numpy/core/fromnumeric.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'numpy/core/fromnumeric.py') diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 10b20c0b1..6f7c45859 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -28,12 +28,7 @@ __all__ = [ 'std', 'sum', 'swapaxes', 'take', 'trace', 'transpose', 'var', ] - -try: - _gentype = types.GeneratorType -except AttributeError: - _gentype = type(None) - +_gentype = types.GeneratorType # save away Python sum _sum_ = sum -- cgit v1.2.1