change of random state when pyc created??

Alan G Isaac aisaac at american.edu
Wed May 9 11:47:04 EDT 2007


Diez B. Roggisch wrote:
> Not really, but that depends on what you know about the concept of sets and
> maps as collections of course.
> 
> The contract for sets and dicts doesn't imply any order whatsoever. Which is
> essentially the reason why
> 
> set(xrange(10))[0]
> 
> doesn't exist, and quite a few times cries for an ordered dictionary as part
> of the standard libraries was made.


It seems to me that you are missing the point,
but maybe I am missing your point.

The question of whether a set or dict guarantees
some order seems quite different from the question
of whether rerunning an **unchanged program** yields the
**unchanged results**.  The latter question is the question
of replicability.

Again I point out that some sophisticated users
(among which I am not numbering myself) did not
see into the source of this "anomaly".  This
suggests that an explicit warning is warranted.

Cheers,
Alan Isaac

PS I know ordered dicts are under discussion;
what about ordered sets?



More information about the Python-list mailing list