David Howlett added the comment:

I am using python 3.5 in a REPL in an IDE called Komodo running on Windows.

After reading your comments I wrote the following python file:

try:
    x = float('∞')
except ValueError:
    print('Value error was correctly thrown')

This throws a ValueError as you describe. I get the following behaviour in 
powershell and cmd.exe:

>>> float('\u221e')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: could not convert string to float: '\u221e'

In the Komodo REPL I see the following behaviour:

>>> '∞'
'8'
>>> '\u221e'
'\u221e'

I now believe the issue is with how Komodo reads in characters from its REPL.

In the course of testing I also found out that the REPL in Komodo suffers and 
internal fault whenever it tries to print '∞' in a debug message.

Unless someone objects I will close this issue in the Python bug tracker and 
open a new issue in the Komodo bug tracker.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27412>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to