# Is this valid (or is excp local only to try/except)?
 try:
    try:
       doSomething1
       excp = 0
    except:
       excp = 1
    #endTry
    if (_excp_): doSomething1 # is excp defined here?
    excp = 0
 except:
    excp = 1
#endTry
if (excp): doSomething2 # is excp defined here?


 # valid, but more verbose (and maybe redundant?)
 excp = 0
 try:
    excp = 0
    try:
       doSomething1
       excp = 0  # reset incase future inner block
    except:
       excp = 1
    #endTry
    if (_excp_): doSomething1
    excp = 0  # reset incase inner block set excp=1
 except:
    excp = 1
#endTry
if (excp): doSomething2

I am not so interested in what a particular version of the
Python/Jython interpreter does, but rather what is "right".

Pls "CC" replies to [EMAIL PROTECTED] (as well as newsgroup)
Barry Searle,    [EMAIL PROTECTED]




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to