Skip to content

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

@nielstron

Description

@nielstron

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bb: minorMinor issue according to bug bounty categorizationbugSomething isn't workingbug bountyThis issue is prized out as part of the Bug Bounty Program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions