Andreas Sandberg has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/15991

Change subject: python: Remove uses of tuple unpacking in function params
......................................................................

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 <[email protected]>
---
M src/python/m5/SimObject.py
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py
index 099927f..cac74f2 100644
--- a/src/python/m5/SimObject.py
+++ b/src/python/m5/SimObject.py
@@ -686,7 +686,7 @@
         # 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"
@@ -782,7 +782,7 @@
         # 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]

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15991
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I36c72962e33a9ad37145089687834becccc76adb
Gerrit-Change-Number: 15991
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to