rename PersistentMapping?
Jeremy Hylton <[email protected]> Mon, 22 Jul 2002 16:19:02 -0400
| Newsgroups | gmane.comp.python.zope.zodb4 |
|---|---|
| Message-ID | <[email protected]> |
On the persistent SIG list, someone suggested change PersistentMapping to PersistentDict. I've advocated this position in the past, and would like to make the change now. The old (Zope 2.4) PersistentMapping implementation and design philosophy was to wrap any sort of non-persistent mapping and make it persistent. The code went out of its way to use only __getitem__() and keys() methods on the underlying mapping. I've ended up changing that for Zope 3 (and later Zope 2 versions) because all the code ended up using it as a dict. It was helpful to have more dict methods supported, and it simplified the implementation to use UserDict to provide the mapping implementation. So I'd suggest renaming the data structure. I'd be happy to accommodate users who need a persistent mapping object but can't use a dict, but I'd like to wait and see if any use cases appear. I suspect it isn't really needed. Jeremy