File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2059,15 +2059,18 @@ class MultiPath(traits.List):
2059
2059
"""
2060
2060
2061
2061
def validate (self , object , name , value ):
2062
+
2063
+ # want to treat range and other sequences (except str) as list
2064
+ if not isinstance (value , str ) and isinstance (value , collections .Sequence ):
2065
+ value = list (value )
2066
+
2062
2067
if not isdefined (value ) or \
2063
2068
(isinstance (value , list ) and len (value ) == 0 ):
2064
2069
return Undefined
2065
- newvalue = value
2066
2070
2067
- if isinstance (value , collections .Sequence ):
2068
- newvalue = list (value )
2071
+ newvalue = value
2069
2072
2070
- if not isinstance (value , collections . Sequence ) \
2073
+ if not isinstance (value , list ) \
2071
2074
or (self .inner_traits () and
2072
2075
isinstance (self .inner_traits ()[0 ].trait_type ,
2073
2076
traits .List ) and not
You can’t perform that action at this time.
0 commit comments