Execution speed question

Diez B. Roggisch deets at nospam.web.de
Tue Jul 29 18:20:17 CEST 2008

Suresh Pillai wrote:

> On Mon, 28 Jul 2008 16:48:28 +0200, Suresh Pillai wrote:
>> Okay, please consider this my one absolutely stupid post for the year.
>> I'd like to pretend it never happened but unfortunately the web doesn't
>> allow that.  Having never used sets, I unfort read something that lead
>> to it, but ...
> Okay, got some sleep and what I meant to ask, although equally basic, but
> not silly:
> For sets, I presume they are built on top of or like dicts, and there is
> nothing crazy in the low level implementation so that I can be guaranteed
> that if I don't alter the set, then the order, although arbitrary, will
> be maintained in successive iterations over the contents?

It is currently that way, but relying on it is certainly to be considered an
implementation detail that might disappear without warning.


More information about the Python-list mailing list