except clause syntax question
tjreedy at udel.edu
Wed Feb 1 01:12:37 CET 2012
On 1/31/2012 8:57 AM, Charles Yeomans wrote:
> In any case, though I appreciate your attempt at a post hoc justification,
> I was hoping for a positive explanation.
I think the best you are going to get is that Python somewhat
consistently*, for both practical and historical reasons#, uses tuples
when the syntax allows an object or collection of objects.
* except, isinstance, isubclass, ''%x, perhaps other places.
In the last case, that creates a problem when one wants to interpolate a
tuple as an object rather than having it viewed as a container of
several objects to be interpolated. That was on
# Python once treated tuples as different from lists in ways that is not
true now. (Read the 1.5 docs if really interested.)
Terry Jan Reedy
More information about the Python-list