summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2016-01-29 14:41:45 +0100
committerJan Pokorný <jpokorny@redhat.com>2016-02-01 23:54:22 +0100
commitcdb4925bbb219f828bcfe0af591468252d88bb54 (patch)
tree74d722057f262bffa344aa4d0e315b10e6d2c19b
parent02551b5c881a1551caa597358ad1c709818a456b (diff)
downloadclufter-cdb4925bbb219f828bcfe0af591468252d88bb54.tar.gz
clufter-cdb4925bbb219f828bcfe0af591468252d88bb54.tar.xz
clufter-cdb4925bbb219f828bcfe0af591468252d88bb54.zip
utils_func: get rid of noop expression
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--utils_func.py6
1 files 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])