tuples, index method, Python's design

Georg Brandl g.brandl at gmx.net
Mon Apr 9 03:43:12 EDT 2007


Paul Rubin schrieb:
> Steven D'Aprano <steve at REMOVE.THIS.cybersource.com.au> writes:
>> I think the problem is that Python developers are split between those who
>> see tuples as immutable lists, and those who see them as records/structs.
> 
> I think the construction
> 
>    def f(*a): ...
> 
> shows that the "immutable list" interpretation is firmly ensconced in
> the language.

IIRC, for this use case of tuples there was a practical reason rather than
an interpretation one. It is also on the list of potential changes for
Python 3000.

Georg




More information about the Python-list mailing list