From: Ali Saidi Date: Thu, 8 Nov 2007 15:46:41 +0000 (-0500) Subject: Python: Allow a range to be a python tuple/list. X-Git-Tag: m5_2.0_beta5~97 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4222610ea1106b60deb2fa659e580168a8ce511;p=gem5.git Python: Allow a range to be a python tuple/list. --HG-- extra : convert_revision : 81cf805055e2f4d62e56a02ac82a0b230251f40b --- diff --git a/src/python/m5/params.py b/src/python/m5/params.py index 27bb24bd7..241d4ceaf 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -457,6 +457,9 @@ class Range(ParamValue): elif isinstance(args[0], Range): self.first = self.type(args[0].first) self.second = self.type(args[0].second) + elif isinstance(args[0], (list, tuple)): + self.first = self.type(args[0][0]) + self.second = self.type(args[0][1]) else: self.first = self.type(0) self.second = self.type(args[0]) - 1