On Sep 13, 2012, at 10:30 PM, Eric Bennett wrote: > [woz:~] bennette% > /Library/Frameworks/Python.framework/Versions/2.6/bin/python pytest.py > Traceback (most recent call last): > File "pytest.py", line 2, in <module> > number = int(example_string) > ValueError: invalid literal for int() with base 10: '10.3'
Actually, that is the opposite of brain dead. If you want the interpreter to be brain dead, use eval: py> eval('10.3') 10.300000000000001 (The trailing digits are related to binary floating point imprecision intrinsic to floats.) James