Search the difference: Why this function defenition does'nt work?

Aahz Maruch aahz at
Sat Dec 22 13:35:55 EST 2001

In article <3C24C8DD.4090300 at>, Luke  <LLoeffler at> wrote:
>If you use a list index [0] that returns a single element of the type 
>that that element is (which is what you want in this case).  But when 
>you use the colon for slice notation, you are asking python to return a 
>tuple of all the elements up to the zeroth element, which is no 
>elements--an empty tuple.  Then you are trying to add a number to a 
>tuple which is undefined.

                      --- Aahz  <*>  (Copyright 2001 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista   

Tenth Virtual Anniversary: 9 days and counting

More information about the Python-list mailing list