[Zope] Dealing with Dictionaries

James W. Howe jwh@allencreek.com
Wed, 01 Mar 2000 17:25:30 -0500


At 04:04 PM 3/1/00 -0600, Evan Simpson wrote:
>----- Original Message -----
>From: James W. Howe <jwh@allencreek.com>
> > to be able to get a list of values.  I could easily do this in Python, but
> > I'm sure there must be a simple way to do this in DTML.  I tried something
> > like:
> >
> > <dtml-return "_['dictionaryVariableName'].keys()">
> >
> > but that didn't work.  I did notice that if I just used
> > "_['dictionaryVariableName']" I actually got the keys.
>
>That should have worked.  You should be able to manipulate your dictionary
>just as you would expect.  What happened when you tried it? What do you get
>from <dtml-var expr="_['dictionaryVariableName']">?

I get an "AttributeError" on "keys".

James W. Howe				mailto:jwh@allencreek.com
Allen Creek Software, Inc.		pgpkey: http://ic.net/~jwh/pgpkey.html		
Ann Arbor, MI  48103