controls/LibraryPanel.py
branchpython3
changeset 3750 f62625418bff
parent 3303 0ffb41625592
child 3765 88fe6fc9fd38
--- a/controls/LibraryPanel.py	Mon Mar 27 10:19:14 2023 +0200
+++ b/controls/LibraryPanel.py	Fri Oct 28 12:39:15 2022 +0800
@@ -22,7 +22,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-from __future__ import absolute_import
+
 from functools import reduce
 import wx
 
@@ -31,7 +31,7 @@
 # -------------------------------------------------------------------------------
 
 
-[CATEGORY, BLOCK] = range(2)
+[CATEGORY, BLOCK] = list(range(2))
 
 
 # -------------------------------------------------------------------------------
@@ -346,12 +346,10 @@
             if inputs is not None and type_inputs is not None:
                 same_inputs = reduce(
                     lambda x, y: x and y,
-                    map(
-                        lambda x: x[0] == x[1] or x[0] == 'ANY' or x[1] == 'ANY',
-                        zip(type_inputs,
+                    [x[0] == x[1] or x[0] == 'ANY' or x[1] == 'ANY' for x in zip(type_inputs,
                             (inputs[:type_extension]
                              if type_extension is not None
-                             else inputs))),
+                             else inputs))],
                     True)
             else:
                 same_inputs = True