[ZODB-Dev] Iterating through BTreeItems

Michel Pelletier michel@digicool.com
Thu, 24 May 2001 11:01:16 -0700 (PDT)


On Thu, 24 May 2001, Andrew Kuchling wrote:

> >>> t.items()
> <BTreeItems object at 0x82d9478>

> Or loop over it with a 'for' loop.  I have often wished the repr() of
> a BTreeItems was a bit more helpful, but it's a trivial issue.  

I've wished that too, maybe if the repr gave some len() information at the
least.  I end up doing this alot:

>>> tuple(t.keys())

or len() or the like, just to get a better view of the BTreeItems.

-Michel