summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2019-01-26 09:07:54 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2019-02-13 09:53:42 +0000
commite67a3d19b7fabd86d220534302a65ad3b62f751e (patch)
treec3272e7cdfc7e3067342e175bc3fedb68c7e7f53 /src/python/m5
parent23af972756a98410bd41472bd33ea651b5180f07 (diff)
downloadgem5-e67a3d19b7fabd86d220534302a65ad3b62f751e.tar.xz
python: Remove uses of tuple unpacking in function params
Python 3 doesn't support tuple unpacking in function parameters and lambdas. Change-Id: I36c72962e33a9ad37145089687834becccc76adb Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15991 Reviewed-by: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/SimObject.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py
index f553fd664..20bb5faec 100644
--- a/src/python/m5/SimObject.py
+++ b/src/python/m5/SimObject.py
@@ -681,7 +681,7 @@ class MetaSimObject(type):
# the object itself, not including inherited params (which
# will also be inherited from the base class's param struct
# here). Sort the params based on their key
- params = map(lambda (k, v): v, sorted(cls._params.local.items()))
+ params = map(lambda k_v: k_v[1], sorted(cls._params.local.items()))
ports = cls._ports.local
code('''#include "pybind11/pybind11.h"
@@ -777,7 +777,7 @@ module_init(py::module &m_internal)
# the object itself, not including inherited params (which
# will also be inherited from the base class's param struct
# here). Sort the params based on their key
- params = map(lambda (k, v): v, sorted(cls._params.local.items()))
+ params = map(lambda k_v: k_v[1], sorted(cls._params.local.items()))
ports = cls._ports.local
try:
ptypes = [p.ptype for p in params]