dao icon indicating copy to clipboard operation
dao copied to clipboard

Invalid list slicing causes wrong error

Open Night-walker opened this issue 10 years ago • 0 comments

(dao) l = {1:10}
= { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
(dao) l[1:2:3]
[[ERROR]] in file "interactive codes":
  At line 0 : Invalid function definition --- " __main__() ";
  At line 1 : Invalid virtual machine instruction --- " GETI:0,1,2 ";
In code snippet:
      1 :  GETCL       :     0 ,     0 ,     1 ;     1;   1:2:3
>>    2 :  GETI        :     0 ,     1 ,     2 ;     1;   l[1:2:3]
      3 :  RETURN      :     2 ,     1 ,     0 ;     1;   l[1:2:3]
  At line 1 : Invalid operation on the type --- " l[1:2:3] ";
  At line 1 : Types not matching --- " 'none' for 'none' ";

Night-walker avatar Sep 10 '15 14:09 Night-walker