[Victor Safronovich]
> Some  workaround for me(the Collector 1873 poster) was to use data
> attribute of the UserDict instances.
>
> >>> from ZODB.PersistentMapping import PersistentMapping
> >>> from BTrees.OOBTree import OOBTree
> >>> r = OOBTree()
> >>> r.update( PersistentMapping({1:1}).data)
> >>> dict(r)
> {1: 1}
>
> i am using isinstance(obj, UserDict) condition now.

As I mentioned in the Collector issue, you could also use pm.items() (where
pm is a PersistentMapping, or a UserDict, or a Python dict, or a BTree, ...,
anything that supports an items() method returning a sequence of 2-tuples).

_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to