[issue27268] Incorrect error message on float('')

Adam Bartoš report at bugs.python.org
Wed Jun 8 10:34:24 EDT 2016


New submission from Adam Bartoš:

>>> float('foo')
ValueError: could not convert string to float: 'foo'
>>> float('')
ValueError: could not convert string to float: 

should be
ValueError: could not convert string to float: ''

The message comes from Objects/floatobject.c:183 but I don't understand how the empty string gets discarded.

----------
components: Interpreter Core
messages: 267858
nosy: Drekin
priority: normal
severity: normal
status: open
title: Incorrect error message on float('')
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27268>
_______________________________________


More information about the Python-bugs-list mailing list