[Python-bugs-list] [ python-Bugs-675928 ] Have exception arguments keep their type

SourceForge.net noreply@sourceforge.net
Mon, 27 Jan 2003 22:06:53 -0800


Bugs item #675928, was opened at 2003-01-27 22:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=675928&group_id=5470

Category: Python Interpreter Core
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Have exception arguments keep their type

Initial Comment:
If you execute the following code::

try:
    raise Exception('a string')
except Exception, err:
    print type(err)

it prints out that ``err`` is a type 'instance'.  It would be nice if it returned the type of the actual argument (in this case, type 'str').

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=675928&group_id=5470