RE: [ZODB-Dev] Re: SVN: ZODB/branches/anguenot-ordering-beforecommitsubscribers/src/transaction/_transaction.py Implement the sort and insert using bisect.insort()

2005-08-11 Thread Tim Peters
[Florent Guillaume] I guess you could simply store and increment then index as an attribute of the transaction, yes. Right! That's an easy, obviously correct way to do it, and is the one I'd probably do. Another way is to define a little class to hold a hook's info, and give it a __cmp__

RE: [ZODB-Dev] Re: SVN: ZODB/branches/anguenot-ordering-beforecommitsubscribers/src/transaction/_transaction.py Implement the sort and insert using bisect.insort()

2005-08-10 Thread Tim Peters
[Florent Guillaume] Frankly I don't see the point of using bisect if you do a linear pass on the list first. The original code was clearer and was faster. If you had a natural way of getting the index, then why not. But anyway this kind of hook list will have only a few elements in it.