[Patches] [ python-Patches-726751 ] Clarify docs for except target assignment
SourceForge.net
noreply@sourceforge.net
Thu, 24 Apr 2003 01:30:34 -0700
Patches item #726751, was opened at 2003-04-24 01:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=726751&group_id=5470
Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Clarify docs for except target assignment
Initial Comment:
I have always found the docs dealing with the target as found in
'except' clauses misleading::
try:
raise Exception('argument 1')
except Exception, x:
print type(x)
This code outputs ``<type 'instance'>`` while I would have expected
``<type 'str'>`` from the way the docs read (at least to me). So I
tried to clarify this in the tutorial and references (Doc/tut/tut.tex and
Doc/ref/ref7.tex respectively). If people think I am nuts and people
don't get confused by the fact that having a single
target gets the exception instance assigned to it while a tuple of
targets gets the exception to unpack its arg values through iterating
over them with the way the docs are now, then I guess I am nuts. =)
Regardless of the final outcome of this patch, the result will close/
reject bug #675928 .
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=726751&group_id=5470