Search the difference: Why this function defenition does'nt work?
aahz at panix.com
Sat Dec 22 13:35:55 EST 2001
In article <3C24C8DD.4090300 at home.com>, Luke <LLoeffler at home.com> wrote:
>If you use a list index  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 pobox.com)
Hugs and backrubs -- I break Rule 6 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista
Tenth Virtual Anniversary: 9 days and counting
More information about the Python-list