Python: Allow a range to be a python tuple/list.
--HG-- extra : convert_revision : 81cf805055e2f4d62e56a02ac82a0b230251f40b
This commit is contained in:
parent
11b931df6a
commit
f4222610ea
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue