This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: float() and int() TypeError messages differ
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: duplicate
Dependencies: Superseder: A better error message for float()
View: 17080
Assigned To: Nosy List: MLModel, r.david.murray
Priority: normal Keywords:

Created on 2013-12-24 14:29 by MLModel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg206892 - (view) Author: Mitchell Model (MLModel) Date: 2013-12-24 14:29
[Sorry if ctypes is wrong component -- don't know which to use.]
Given an invalid type, int()'s TypeError message includes the name of the invalid type, but float()'s doesn't. (Nor does complex()'s.) All three should give analogous error messages. int()'s version, with the name of the offending type, seems better.
msg206893 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 14:46
Could you provide examples?  I'm not seeing the problem myself.

Unless you really do mean this to apply to the ctypes python module, which I don't know much about.  It sounds like you are talking about the built in types though.
msg206894 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-12-24 14:57
I take it back.  This is a duplicate of issue 17080 and has already been fixed in 3.4, which is why I didn't see the problem (I was testing in my development sandbox).
History
Date User Action Args
2022-04-11 14:57:55adminsetgithub: 64259
2013-12-24 14:57:18r.david.murraysetstatus: open -> closed
superseder: A better error message for float()
messages: + msg206894

type: behavior
resolution: duplicate
stage: resolved
2013-12-24 14:46:57r.david.murraysetnosy: + r.david.murray
messages: + msg206893
components: + Interpreter Core, - ctypes
2013-12-24 14:29:12MLModelcreate