Tuple Format?

Grant Edwards nobody at nowhere.nohow
Sat Sep 2 11:32:55 EDT 2000


On Sat, 02 Sep 2000 13:39:14 GMT, Gene C <gchiaramonte at yahoo.com> wrote:
>Right, it was just a suggestion. I still think the list [] and dictionary {}
>formats are quite elegant. I only wish the tuple could be implemented in a
>similar manner. (Keeping the current format so tuples in the current format
>is not broken.)
>
>What about using the pipe to define tuples?
>
>Empty Tuple ||
>1 Element Tuple |'a'|
>3 Element Tuple |'a', 'b', 'c'|

Same problem as with using < and >, it's aready a binary
operator, so the syntax is a bit ambiguous.  One thought would
be to use the single quotes for tuple delimiters (as in `a,b,c'
or `x' or `'). This has the advantage (in my mind) of reminding
one that tuples are like strings: immutable.

Nope, the only reasonable solution is an entirely new set of
delimiters for tuples.  Everybody please queue up on left to
have your keyboards replaced.

-- 
Grant Edwards                   grante             Yow!  Yow! And then we
                                  at               could sit on the hoods of
                               visi.com            cars at stop lights!



More information about the Python-list mailing list