[issue17080] A better error message for float()

2013-11-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset a73c47c1d374 by Ezio Melotti in branch 'default': #17080: improve error message of float/complex when the wrong type is passed. http://hg.python.org/cpython/rev/a73c47c1d374 -- nosy: +python-dev ___ Pytho

[issue17080] A better error message for float()

2013-11-07 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the review. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17080] A better error message for float()

2013-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue17080] A better error message for float()

2013-01-31 Thread Ezio Melotti
Ezio Melotti added the comment: Attached a new patch with tests. I added the quotes around the type and fixed complex() too. -- Added file: http://bugs.python.org/file28929/issue17080-2.diff ___ Python tracker __

[issue17080] A better error message for float()

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: I was thinking about that but in other places they are not used. Adding them is OK though. -- ___ Python tracker ___ ___

[issue17080] A better error message for float()

2013-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: You should put single quotes around the type name, i.e.: "float() argument must be a string or a number, not '%.200s'" -- nosy: +pitrou stage: needs patch -> patch review ___ Python tracker

[issue17080] A better error message for float()

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: Here's an initial patch, still needs tests. The same should be done for complex() too. Maybe it could be applied to older branches too. -- assignee: -> ezio.melotti keywords: +patch Added file: http://bugs.python.org/file28907/issue17080.diff ___

[issue17080] A better error message for float()

2013-01-30 Thread Kushal Das
Changes by Kushal Das : -- nosy: +kushaldas ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue17080] A better error message for float()

2013-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: Sounds reasonable to me. -- nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.4 -Python 2.7 ___ Python tracker ___ __

[issue17080] A better error message for float()

2013-01-30 Thread Jonathan Livni
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,