Python buglet: Incorrect error message for float([0])

Aahz aahz at pythoncraft.com
Wed May 1 16:08:05 EDT 2002


In article <3CCF7810.5000608 at erols.com>,
Edward C. Jones <edcjones at erols.com> wrote:
>
>This line of Python (2.2):
>
>     x = float([0])
>
>gives the error:
>
>     TypeError: float() needs a string argument
>
>But since "float(0)" is OK, a better error message might be:
>
>     TypeError: the argument of float() must be a string or a number

That looks like a good bug to submit to SourceForge.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I used to have a .sig but I found it impossible to please everyone..."  --SFJ



More information about the Python-list mailing list