[Python-3000] a slight change to __[get|set|del]item__

tomer filiba tomerfiliba at gmail.com
Fri Jun 2 22:06:59 CEST 2006


Guido wrote:
> Because the (...) in a function call isn't a tuple.
>
> I'm with Oleg -- a[x, y] is *intentionally* the same as a[(x, y)].
> This is a feature; you can write
>
>    t = x, y    # or t = (x, y)
>
> and later
>
>   a[t]

well is func((1,2,3)) the same as func(1,2,3)? no.
so why should container[1, 2, 3] be the same as container[(1,2,3)]?
you say it's a feature. is it intentionally *ambiguous*?

what you'd want in that case is
    t = (1, 2, 3)
    container[*t]
or something like that.

i guess it's a dead subject, but i wanted to have that clarified.


-tomer


More information about the Python-3000 mailing list