except clause syntax question

Terry Reedy tjreedy at udel.edu
Tue Jan 31 19:12:37 EST 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 mailing list