Hmm, I'd say rather, deranged. Why bother to have exceptions if you
treat them like this?
try:
file = open('...', 'r')
data = process_file(file)
except IOError:
data = process_something_else()
Is proper. the 'else' version is better written:
if (file = open('...', 'r'))
then
data = process_file(file)
else
data = process_something_else()
If you want to execute code UNconditionally after a try block, use
Try..Finally. If you want code to only execute if a exception dosent
happen, then thats what the try body is for.
-- John Redford (AKA GArrow) | 3,600 hours of tape. jredford@lehman.com | 5 cans of Scotchguard.