Dan Bishop wrote:

>> Is there any place in the language that still requires tuples instead
>> of sequences, except for use as dictionary keys?
> 
> The % operator for strings.  And in argument lists.
> 
> def __setitem__(self, (row, column), value):
>    ...
> 
Don't forget the exception specification in a try..catch statement:

> An object is compatible with an exception if it is either the object
> that identifies the exception, or (for exceptions that are classes) it
> is a base class of the exception, or it is a tuple containing an item
> that is compatible with the exception.

Requiring a tuple here means that the code doesn't have to worry about a 
possible recursive data structure.
 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to