You have a built-in Zope object for this : PersistentMapping. dict1=PersistentMapping({'a':1,'b':1,'c':1, ...}) dict1=PersistentMapping({'a':2,'d':4,'e':6})
The only thing you can not do compared to dictionaries is : for key in dict1: do something (you need to use for key in dict1.keys():...) Pascal -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de Tamas Hegedus Envoyé : lundi 20 juin 2005 11:12 À : zope@zope.org Objet : [Zope] custom_persist_obj Hi, I am new to Zope and not a programmer. It is a little bit complex for me. I am very frustrated, as I can not find the solution for a pretty simple task: I would like to have persistent object with dictionaries. I think I do not need a ZClass or Product, just a simple object for holding mutable and persistent dictionaries (Manipulating with Script). Like MyObject: dict1 = [ a:1, b:1, c:1, ...] dict2 = [ a:2, d:4, e:6] etc. Thanks for your help in advance, Tamas _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )