Yes, thank you.  I was forgetting that this is ordinary function
syntax, with assignment (dict being the function).  I was trying to do
it with curly braces.

Kirby


On 8/15/06, John Zelle <[EMAIL PROTECTED]> wrote:
> Is this what you're looking for:
> >>> d = dict(key1=52, key2=12)
> >>> d
> {'key2': 12, 'key1': 52}
>
> Of course this only works for keys that are strings.
>
> --John
>
> On Tuesday 15 August 2006 1:28 am, kirby urner wrote:
> > Someone (Dethe?  Ian?) showed me syntax I'd never seen before around
> > Python dictionary defining, involving an equal sign I thought.  Tried
> > searching my gmail, other things.  Maybe faster to just ask:  what was
> > that syntax again?
> >
> > Kirby
> > _______________________________________________
> > Edu-sig mailing list
> > Edu-sig@python.org
> > http://mail.python.org/mailman/listinfo/edu-sig
>
> --
> John M. Zelle, Ph.D.             Wartburg College
> Professor of Computer Science    Waverly, IA
> [EMAIL PROTECTED]          (319) 352-8360
>
_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to