[issue27412] float('∞') returns 8.0

2016-06-29 Thread David Howlett

New submission from David Howlett:

float('inf') returns a float with a value of inf
float('∞') returns a float with a value of 8.0

I can't think of any justification for returning 8.0 other then ∞ looks like an 
8 turned sideways. I believe float('∞') should return inf.

--
components: Unicode
messages: 269475
nosy: David Howlett, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: float('∞') returns 8.0
type: behavior
versions: Python 3.5

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



[issue27412] float('∞') returns 8.0

2016-06-29 Thread David Howlett

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 "", line 1, in 
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 
<http://bugs.python.org/issue27412>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27412] float('∞') returns 8.0

2016-06-29 Thread David Howlett

David Howlett added the comment:

I am sorry about misattributing this bug and wasting your time.

I have opened two new bugs against Komodo:

https://github.com/Komodo/KomodoEdit/issues/1760
https://github.com/Komodo/KomodoEdit/issues/1759

They are looking into it.

--

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