codon icon indicating copy to clipboard operation
codon copied to clipboard

int() function produces ValueError when passed a string with a newline character

Open lovasoa opened this issue 3 years ago • 0 comments

When I run the following code:

print(int("3\n"))

The expected output is 3, as it is when run with the regular python interpreter. However, when run with codon, I get the following error message:

ValueError: invalid literal for int() with base 10: 3

lovasoa avatar Dec 09 '22 09:12 lovasoa