Chris Withers wrote:
> Martin Aspeli wrote:
>> I'll bet one is backed by a hashtable and the other is backed by an r/b
>> tree, meaning the Set is O(1) lookups, possibly a bit less space
>> efficient
>> and non-ordered, 
> Well, Set's are definitely ordered, same as normal python sets...


"A set object is an unordered collection of immutable values."

Which makes sense. Sets in the mathematical sense are not ordered either,
nor are sets in other languages (notably Java's Collections API), nor is
zope.schem.Set. Tuples and Lists are ordered.

Sets may turn out to be *sorted* if they're implemented with trees, but I
don't think the implementation promises that either.


View this message in context:
Sent from the Zope - Dev mailing list archive at

Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to