You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #206 which was closed couple of days ago.
a :str
for a in "abc":
print (a)
(lp) C:\Users\kunni\lpython>python try.py
a
b
c
(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
semantic error: Only function call `range(..)` supported as for loop iteration for now
--> try.py:3:5 - 4:17
|
3 | for a in "abc":
| ^^^^^^^^^^^^^^^...
...
|
4 | print (a)
| ...^^^^^^^^^^^^^^^^^
Considering range is the only supported function, a string input is not another function like reverse(str_name) or enumerate(str_name) so a better error message can be provided if this is not in the implementation plan as of now.