[ZODB-Dev] Iterating through BTreeItems

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


On Thu, 24 May 2001, Jim Fulton wrote:

> 
> In general. the repr would be counter productive, since there are
> typically lots of items. 

I agree, if I remember correctly, this is the reason why it is the way it
is now.

> I'd happily accept a patch (or maybe 
> later a checkin) for a repr that did the normal thing when there
> weren't many values and then maybe showed some elided values when
> there are more than a certain amount.

This is a good option, but I think just a repr that shows length
information would be a good compromise:

<BTreeItems contains 84 objects at 0x82d9478>

This has the benefit of being able to show you changes to large sets,
where an elided view would only show you two similar elides
(elidations?, elidii?) even for two different sized sets, or if the same
set grew or shrunk by only a small amount, not enough to change the way
the elided view is displayed.

-Michel