[ZODB-Dev] Re: setdefault branch

2005-08-30 Thread Ruslan Spivak
Tim Peters [EMAIL PROTECTED] writes: [snip] Proposal: make BTree/Bucket setdefault() a two-argument function (3 if you count ``self`` too). In practice, an explicit default is always passed, and not even in theory could we come up with a sane default-default that works across all tree

RE: [ZODB-Dev] BTrees and setdefault

2005-08-30 Thread Tim Peters
[Dmitry Vasiliev] Since then I've changed my mind and almost haven't used setdefault(). So now I'm only +0 on the idea. :-) I think pop() is even more useful than setdefault(), I've planned to use it for some persistent queue implementation (based on BTrees). So if setdefault() will be added I

RE: [ZODB-Dev] Re: setdefault branch

2005-08-30 Thread Tim Peters
[Ruslan Spivak] Really, that usage of calling setdefault without explicit default is confusing and useless IMHO too. I just wanted to think about possible solution if someone ever could think about usefulness of setdefault without default, but definitely in that case

RE: [ZODB-Dev] multi-level undo on a single object

2005-08-30 Thread Tim Peters
[Arthur Peters] I want to do the following: commit a change to an object, then commit another. Now I want to undo the second change. Easy: get the tid using undoLog and call undo(tid, transaction.get()). Now the following transactions are in the DB: - Change 1 - Change 2 - Undo change 2

RE: [ZODB-Dev] Re: BTrees and setdefault

2005-08-30 Thread Tim Peters
[Ruslan Spivak] Do you think code for pop() should go into separate branch? I think code for pop() should go on _a_ branch, yes. ___ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list -

RE: [ZODB-Dev] multi-level undo on a single object

2005-08-30 Thread Arthur Peters
Thanks you very much. I'm still having issues but I'll investigant it myself before I ask anything else. I think I came across as pushy and demanding and I'm sorry. I didn't mean to. I just ment this as questions and ideas. You know ZODB much better than I and I'll go for a app-level

RE: [ZODB-Dev] multi-level undo on a single object

2005-08-30 Thread Tim Peters
[Arthur Peters] Thanks you very much. Hey, we're both named Peters -- you're probably the son I never knew (or vice versa ;-)) I'm still having issues but I'll investigant it myself before I ask anything else. I think I came across as pushy and demanding and I'm sorry. I didn't mean to. I