On Fri, 06 Jul 2007 16:22:35 +0000, Robert Dailey wrote:

> On Jul 6, 11:09 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> This gets much easier if you change your structure around a bit:
>>
>>     d = {}
>>     d["cat", "paw"] = "some string"
>>
>> Jean-Paul
> 
> I like this format. I'm not familiar with it however. In my research
> of python I was not aware it was legal to have comma operators inside
> of the brackets. What does this mean? Is there some terminology that I
> can search for to research this concept? Thanks.

It's mapping the tuple ('cat', 'paw') to 'some string'.  Commas make
tuples.  The parenthesis are just necessary for the literal empty tuple
and if the syntax would be ambiguous otherwise.

Ciao,
        Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to