Gary Poster wrote:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: argument to reversed() must be a sequence
The fact that this works for the OOSet is an implementation accident.
As discussed elsewhere in this thread, sets are not sequences. The fact
that the elements are ordered is an implementation detail (although
given that these sets are essentially the keys of a BTree, it's
unsurprising that they are).
You could argue that reversed(OOSet((1,2,3))) should raise an
exception. IMO, why bother.
*grunt*
Okay, so I want a persistent, ordered sequence which is quick to find
items in and which doesn't re-store the whole sequence when an item is
inserted or removed.
What should I be using?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )