summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/cpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/cpp.py')
-rw-r--r--src/engine/SCons/cpp.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/engine/SCons/cpp.py b/src/engine/SCons/cpp.py
index 4cc771b..0ba10f5 100644
--- a/src/engine/SCons/cpp.py
+++ b/src/engine/SCons/cpp.py
@@ -31,7 +31,6 @@ import SCons.compat
import os
import re
-import collections
#
# First "subsystem" of regular expressions that we set up:
@@ -73,7 +72,7 @@ cpp_lines_dict = {
# the corresponding compiled regular expression that fetches the arguments
# we care about.
Table = {}
-for op_list, expr in list(cpp_lines_dict.items()):
+for op_list, expr in cpp_lines_dict.items():
e = re.compile(expr)
for op in op_list:
Table[op] = e
@@ -88,7 +87,7 @@ del op_list
override = {
'if' : 'if(?!def)',
}
-l = [override.get(x, x) for x in list(Table.keys())]
+l = [override.get(x, x) for x in Table.keys()]
# Turn the list of expressions into one big honkin' regular expression
@@ -131,7 +130,7 @@ CPP_to_Python_Ops_Sub = lambda m: CPP_to_Python_Ops_Dict[m.group(0)]
# re module, as late as version 2.2.2, empirically matches the
# "!" in "!=" first, instead of finding the longest match.
# What's up with that?
-l = sorted(list(CPP_to_Python_Ops_Dict.keys()), key=lambda a: len(a), reverse=True)
+l = sorted(CPP_to_Python_Ops_Dict.keys(), key=lambda a: len(a), reverse=True)
# Turn the list of keys into one regular expression that will allow us
# to substitute all of the operators at once.
@@ -267,7 +266,7 @@ class PreProcessor(object):
d = {
'scons_current_file' : self.scons_current_file
}
- for op in list(Table.keys()):
+ for op in Table.keys():
d[op] = getattr(self, 'do_' + op)
self.default_table = d
@@ -553,7 +552,7 @@ class PreProcessor(object):
except KeyError:
m = function_name.search(s)
s = self.cpp_namespace[m.group(1)]
- if isinstance(s, collections.Callable):
+ if callable(s):
args = function_arg_separator.split(m.group(2))
s = s(*args)
if not s: