Dieter Maurer wrote:
> 
> Chris Withers writes:
>  > ... copying ZODB objects ...
> I use the following function:
> 
> def _clone(o):
>   """clone an object.
> 
>   Currently, a deep copy is used; maybe we should use a shallow
>   copy instead."""
>   c= cPickle.loads(cPickle.dumps(o.aq_base,1))
>   c._p_oid= None
>   return c

Thanks, that looks like what I'm after...

Where did you find it?

cheers,

Chris

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to