Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels