[Zope] Zope product dictionary ?
Paula Mangas
pamm@students.si.fct.unl.pt
Wed, 9 Jan 2002 01:02:54 +0000 (WET)
Supposing that container is an instance of one zope product, called X...
foldername is a dictionary defined on *__init__* method (in product X)...
def __init__(self):
"init method"
( ... )
foldername =3D {}
( ... )
so,
container.foldername['test'] =3D {}
container.foldername['test']['a'] =3D'123'
container.foldername['test']['b'] =3D [1, 2, 3]
works.
And your container object has a dictionary like this:
{'test': {'a': '123', 'b': [1, 2, 3]}, (...)}
I hope this can help,
Paula Mangas
On Wed, 9 Jan 2002, Juli=E1n Mu=F1oz Dom=EDnguez wrote:
> Hum, a Zope object has his own dictionary ???
> How do I store an element in it ?
>
> container.foldername['test']=3D{'a':'123', 'b':[1,2,3]}
>
> works from a python script ?
>
>
>
> On Wed, 9 Jan 2002, Paula Mangas wrote:
>
> >
> >
> > Hi!
> >
> >
> > Maybe, i didn't understand your question but, a Zope object has his o=
wn
> > dictionary.
> >
> > Regards,
> > Paula Mangas
> >
> >
> >
> >
> >
> > On Wed, 9 Jan 2002, Juli=E1n Mu=F1oz Dom=EDnguez wrote:
> >
> > >
> > > Is there an equivalent to a python dictionary, but in a zope object=
??
> > >
> > >
> >
>
>