gauravssnl / skulpt

Automatically exported from code.google.com/p/skulpt
Other
0 stars 0 forks source link

int() parses whitespace characters and zero length strings #108

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Code you're trying to run:
def test():
    int("")
    return True

What does "real" Python output?
ValueError

What does Skulpt output?
True

Please provide any additional information.
Have made a fix here: 
http://code.google.com/r/theajp01-skulpt-int-fix/source/detail?r=6a7be7afe098862
5b42ba27688db7fa1fdf04261 

Couldn't find my way around in the tests. 

Original issue reported on code.google.com by theaj...@gmail.com on 16 Aug 2012 at 9:44

GoogleCodeExporter commented 8 years ago
Also added the same fix for float. I fear there might also come one for long :P

Original comment by theaj...@gmail.com on 16 Aug 2012 at 2:08