opshin icon indicating copy to clipboard operation
opshin copied to clipboard

int(x) does not work for strings with preceding/trailing whitespace

Open nielstron opened this issue 1 year ago • 0 comments

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

nielstron avatar Mar 05 '23 12:03 nielstron