[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/ZODB Persistent Components

webmaster@zope.org webmaster@zope.org
Fri, 08 Nov 2002 22:57:50 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Persistence.stx#2-24

---------------

    The first rules says that your objects must be pickleable.  This
    means that they can be serialized into a data format with the
    "pickle" module.  Most python data types (numbers, lists,
    dictionaries) can be pickled.  Code objects (method, functions,
    classes) and file objects (files, sockets) *cannot* be pickled.
    Instances can be persistent objects if:

      o They subclass 'Persistence.Persistent'

      o All of their attributes are pickleable

      % Anonymous User - Nov. 8, 2002 10:57 pm:
       The result of a ZSQL Method can not be pickled (thanks to a class r():pass)