[Zope] int's as keys for dictionaries

Bryce Harrington bryce at osdl.org
Wed May 26 12:53:51 EDT 2004


On Wed, 26 May 2004, Ben Last (Zope) wrote:

> > Bryce Harrington
> > > > <dtml-let d_test_parameter="{'1':'a', '2':'b'}">
> > Yes, that is correct.  The data structure has strings, but I need to
> > access them using ints as keys.  So I have to convert the ints into
> > strings in order to retrieve the data.
>
> So why not init with
> d_test_parameter="{1:'a', 2:'b'}
> ...so that your keys are ints from the beginning?

Zope is converting them to strings on form submission.

Bryce




More information about the Zope mailing list