[Zope] custom_persist_obj
Paul Winkler
pw_lists at slinkp.com
Mon Jun 20 09:42:02 EDT 2005
Well, sure. But you need to write some unrestricted (i.e.
filesystem-based) code if you want to create instanced of
PersistentMapping and the like.
by the way, if it's ever going to get large, you might look
into using OOBTree instead of PersistentMapping.
See:
http://www.zope.org/Wikis/ZODB/guide/node6.html#SECTION000630000000000000000
-PW
On Mon, Jun 20, 2005 at 03:24:12PM +0200, Pascal Peregrina wrote:
> 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 : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
> Tamas Hegedus
> Envoy? : lundi 20 juin 2005 11:12
> ? : zope at 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 at 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 at 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 )
--
Paul Winkler
http://www.slinkp.com
More information about the Zope
mailing list