Python: Allow a range to be a python tuple/list.
--HG-- extra : convert_revision : 81cf805055e2f4d62e56a02ac82a0b230251f40b
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user