...

[Tim]
>> I agree pop() should be added.  Work up a patch, or at least open a bug
>> report?

[Thomas]
> I can do the patch, and I should even be able to check it in. Would
> anybody object?

I'm the closest thing to a ZODB maintainer there is, and I won't object ;-)
Go for it!

If you count this as a new feature, it should only go in on the ZODB trunk.
If you count this is a bugfix (that's my inclination), then it should also
go in:

    ZODB/branches/3.4
    ZODB/branches/3.5
    ZODB/branches/3.6

Please add a short blurb to NEWS.text too, and a test ... PersistentDict
didn't exist before ZODB 3.3, but PersistentMapping did, and it should grow
a .pop() method too on the Zope-2_7-branch branch of CVS module ZODB3.

BTW, if you were to suggest that the large number of active branches
discourages ZODB contributions, I bet someone would agree <wink>.

>> Note that there are two relevant classes, PersistentDict and
>> PersistentMapping.  The code duplication there sucks (particularly
>> because they can-- and do --get out of synch), and one of them should
>> be deprecated.

> Was there ever a semantic difference, maybe along the lines of mapping
> interface vs dict implementation?

I don't believe any difference was ever intended, beyond just the name
change.  It's lost in the mists of history.  Best I can make out, the
_intent_ was that ZODB4 would have only PersistentDict:

    http://mail.zope.org/pipermail/zodb-dev/2002-August/002971.html

But the ZODB4 project got dropped, and PersistentDict got added to ZODB 3.3
as (a possibly accidental) part of salvaging some of the ZODB4 code.  This
left us with two classes trying to do the same thing, and they've been out
of synch most of the time since then.

Since the database root object under all ZODBs is of type PersistentMapping,
and "everyone knows that", at this point I'd prefer to deprecate
PersistentDict (under the sensible theory that there was never a real reason
for it to exist in the ZODB 3 line).

_______________________________________________
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