[Zope-dev] difference between OOSet and OOTreeSet?

Chris Withers chris at simplistix.co.uk
Thu Mar 1 12:01:36 EST 2007


Hi Gary,

Gary Poster wrote:
> 
>> What should I be using?
> 
> TreeSet.

Interesting, okay, so how should I work around this bogosity?
Is this a bug?

 >>> from BTrees.OOBTree import OOTreeSet,OOSet
 >>> for i in OOSet((1,2,3)): print i,
....
1 2 3
 >>> for i in OOTreeSet((1,2,3)): print i,
....
1 2 3
 >>>
 >>> for i in reversed(OOSet((1,2,3))): print i,
....
3 2 1
 >>> for i in reversed(OOTreeSet((1,2,3))): print i,
....
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
TypeError: argument to reversed() must be a sequence

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-Dev mailing list