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

Oleg Broytmann phd at mail2.phd.pp.ru
Sat May 27 15:36:16 CEST 2006


On Sat, May 27, 2006 at 03:15:32PM +0200, tomer filiba wrote:
> which makes it impossible to diffrenciate between
> >>>y[1, 2]
> (1, 2)
> 
> and
> >>>y[(1, 2)]
> (1, 2)

   Tuples are not created with parenthesizes. Tuples are created with a comma. Hence

1, 2

   *is* a tuple. Just as (1, 2).

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.


More information about the Python-3000 mailing list