Why tuples use parentheses ()'s instead of something else like <>'s?

Grant Edwards grante at visi.com
Wed Dec 29 10:33:23 EST 2004


On 2004-12-29, seberino at spawar.navy.mil <seberino at spawar.navy.mil> wrote:

> Tuples are defined with regards to parentheses ()'s as everyone knows.

Except they're not.  

>>> x = 1,2,3,4
>>> type(x)
<type 'tuple'>
>>> 

Tuples are defined by the infix comma "operator".

-- 
Grant Edwards                   grante             Yow!  I'm working under
                                  at               the direct orders of WAYNE
                               visi.com            NEWTON to deport consenting
                                                   adults!



More information about the Python-list mailing list