[issue17080] A better error message for float()
Jonathan Livni
report at bugs.python.org
Wed Jan 30 09:33:13 CET 2013
New submission from Jonathan Livni:
These lines of Python (2.7):
y = float(x)
gives the error:
TypeError: float() argument must be a string or a number.
In various cases such as:
x = [0]
x = None
x = SomeClass()
In addition to the information given in the error message, it could help, for debugging purposes, to state the type of the object given.
----------
components: Interpreter Core
messages: 180967
nosy: Jonathan.Livni
priority: normal
severity: normal
status: open
title: A better error message for float()
type: enhancement
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17080>
_______________________________________
More information about the Python-bugs-list
mailing list