durusmail: durus-users: some btree enhancements
some btree enhancements
2005-07-13
2005-07-13
2005-07-13
2005-07-13
2005-07-13
Re: __len__ for Btrees was Re: [Durus-users] some btree enhancements
2005-07-14
2005-07-14
2005-07-14
2005-07-14
2005-07-14
2005-07-14
2005-09-09
some btree enhancements
Patrick K. O'Brien
2005-07-13
Mario Ruggier wrote:
>
> On Jul 13, 2005, at 3:57 PM, David Binger wrote:
>
>> But, does anyone know a way to implement this that is simple,
>> reliable, and efficient?
>> Every option I've considered seems worse than leaving this as it is.
>
> Yes, looking at the code, you are right... the added runtime overhead to
> check this during iteration may not be worth it.
>
> Probably silly, but it seems to me that bnode.__iter__ would need to
> check for any "iter-conflicting" changes since last yield...

All it needs to check for is a size change.  Could the BTree class be
changed to keep track of its size?

--
Patrick K. O'Brien
Orbtech    http://www.orbtech.com
Schevo     http://www.schevo.org
Pypersyst  http://www.pypersyst.org

reply