homepage

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: Add 'unexpected_type' to TypeError
Type: enhancement Stage: test needed
Components: Interpreter Core Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, brett.cannon, ezio.melotti
Priority: normal Keywords:

Created on 2013年06月07日 20:55 by brett.cannon, last changed 2022年04月11日 14:57 by admin.

Messages (3)
msg190780 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013年06月07日 20:55
TypeError could grow an 'unexpected_type' attribute to store the type of the argument that was used to trigger the exception. Since types are expected to not be deleted there is no GC worry.
Having an 'expected' attribute makes no sense in the face of a union of types, etc. (unless the assumption of a frozenset is made for the attribute). Plus exceptions typically do not contain info on what would have been acceptable (although in this instance it may make sense).
msg228593 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014年10月05日 17:31
Just a gentle reminder guys.
msg228701 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014年10月06日 14:52
There's actually nothing to remind here since there is no one waiting on input from anyone. Plus this particular issue is covered by http://legacy.python.org/dev/peps/pep-0473/ .
History
Date User Action Args
2022年04月11日 14:57:46adminsetgithub: 62365
2019年04月26日 17:49:52BreamoreBoysetnosy: - BreamoreBoy
2014年10月06日 14:52:20brett.cannonsetmessages: + msg228701
2014年10月05日 17:31:36BreamoreBoysetnosy: + BreamoreBoy

messages: + msg228593
versions: + Python 3.5, - Python 3.4
2013年06月15日 21:06:07ezio.melottisetnosy: + ezio.melotti
2013年06月07日 21:24:11barrysetnosy: + barry
2013年06月07日 20:55:26brett.cannoncreate

AltStyle によって変換されたページ (->オリジナル) /