To catch more than one exception type in an except block, one writes

except (A, B, C) as e:

I'm wondering why it was decided to match tuples, but not lists:

except [A, B, C] as e:

The latter makes more sense semantically to me -- "catch all exception types in 
a list" as opposed to "catch this single thing composed of three exception 
types".


Charles Yeomans


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

Reply via email to