On the Templator page, in the first group of examples:
Gawk, a $dictionary[key].function('argument').
I think that should be $dictionary["key"] or $dictionary[$key] for it
to be an example that runs. It didn't take terribly long to figure
out, but check out PEP 3101 -- the getitem syntax uses unquoted keys,
no variable substitution allowed:
"My name is {0[name]}".format(dict(name='Fred'))
On Apr 10, 8:43 am, "Aaron Swartz" <[EMAIL PROTECTED]> wrote:
> > One thing that isn't really clear from the docs is that dictionary
> > keys still need to be quoted. Example:
>
> I'm not sure where to clarify this; I thought it was just assumed that
> dictionaries would work like they do in Python.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---