Super Tuples

Paul Prescod paul at prescod.net
Tue Dec 28 17:02:38 EST 1999


Manuel Gutierrez Algaba wrote:
> 
> 
> This is a waste of "syntax", 

Actually it is a very efficient use of syntax. We have attribute access
and keyword assignment syntax and both are wasted on tuples. 

> we could have an object in
> a very similar fashion:
> t = mytime(hour = ....)

But then we have an object. It is not a tuple. If you feel that tuples
have no virtues then you should petition for their removal from Python.
If you feel that they DO have virtues then you should argue more
persuasively that improving them somehow hurts things.

> Is this the start of a switching to tuple-oriented programming instead
> of OO-programming?

No. It is the start of making tuples more useful. That doesn't destroy
OO. I strongly doubt that serious Python programmers would abandon
objects for tuples. Tuples don't even have a concept of methods.

 Paul Prescod




More information about the Python-list mailing list