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
{{ message }}
Repository navigation
Escape sequences should be treated as single characters. #1695
Realized this while working on #1589
Escape sequences are treated as 2 characters of a string in Lpython unlike in python. Although it is a small block and the if condition can be modified accordingly for the pull request, it should be corrected.
A minimal example is this -
def f():
print(len("\t")) # Single character for tab space
print(len("\n")) # Single character for new line
print(len("\0")) # Single character for null
f()
(lp) C:\Users\kunni\lpython>python try.py
1
1
1
(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
2
2
2
Activity
harshitmathur2000 commentedon Apr 11, 2023
@certik I want to work on this issue. I am new, so, can you guide which file to look for to handle this?