From cdb4925bbb219f828bcfe0af591468252d88bb54 Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Fri, 29 Jan 2016 14:41:45 +0100 Subject: utils_func: get rid of noop expression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Pokorný --- utils_func.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils_func.py b/utils_func.py index 2d3bc72..da55d0b 100644 --- a/utils_func.py +++ b/utils_func.py @@ -1,5 +1,5 @@ # -*- coding: UTF-8 -*- -# Copyright 2014 Red Hat, Inc. +# Copyright 2016 Red Hat, Inc. # Part of clufter project # Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt) """Various functional-paradigm helpers""" @@ -72,7 +72,7 @@ loose_zip = lambda a, b: zip( ) apply_loose_zip_preserving_depth = \ lambda a, b: \ - (type(a) if type(a) == type(b) else type(a))( + type(a)( [apply_loose_zip_preserving_depth(*p) for p in loose_zip(a, b)] ) if tuplist(a) == tuplist(b) == True else zipped_outlier([a, b]) # as previous, but with length checking of some sort @@ -80,7 +80,7 @@ apply_loose_zip_preserving_depth = \ # to the length of the bigger one apply_strict_zip_preserving_depth = \ lambda a, b: \ - (type(a) if type(a) == type(b) else type(a))( + type(a)( [apply_strict_zip_preserving_depth(*p) for p in zip(a, b)] ) if tuplist(a) == tuplist(b) == True and len(a) == len(b) \ else zipped_outlier([a, b]) -- cgit