opshin
opshin copied to clipboard
int(x) does not work for strings with preceding/trailing whitespace
Describe the bug
The function int(x)
in the python standard lib implicitly strips the invoked string before converting it to an integer.
OpShin does not currently do this, breaking the semantic equivalence with python
Example
int("0\n")
-> 0 (in Python)
-> error (in opshin)
Bug bounty: 200 ADA