Re: [Python-Dev] set iteration order

2011-02-27 Thread Hagen Fürstenau
>> It's not a matter of dependence on iteration order, but of >> reproducibility (in my case there were minor numerical differences due >> to different iteration orders). > > Can you give a code example? I don’t understand your case. It's a bit involved (that's why it took me a while to locate t

Re: [Python-Dev] set iteration order

2011-02-26 Thread Raymond Hettinger
On Feb 26, 2011, at 4:09 PM, Antoine Pitrou wrote: > On Sat, 26 Feb 2011 10:09:33 +0100 > Hagen Fürstenau wrote: >> >> I just hunted down a change in behaviour between Python 3.1 and 3.2 to >> possibly changed iteration order of sets due to the optimization in >> issue #8685. Of course, this or

Re: [Python-Dev] set iteration order

2011-02-26 Thread Antoine Pitrou
On Sat, 26 Feb 2011 10:09:33 +0100 Hagen Fürstenau wrote: > > I just hunted down a change in behaviour between Python 3.1 and 3.2 to > possibly changed iteration order of sets due to the optimization in > issue #8685. Of course, this order shouldn't be relied on in the first > place, but the side

Re: [Python-Dev] set iteration order

2011-02-26 Thread Steven D'Aprano
Hagen Fürstenau wrote: Code with any dependence on the iteration order of unordered collections (other than the guarantee that d.keys() and d.values() match at any given time as long as d is unchanged) is buggy. It's not a matter of dependence on iteration order, but of reproducibility (in my c

Re: [Python-Dev] set iteration order

2011-02-26 Thread Éric Araujo
> It's not a matter of dependence on iteration order, but of > reproducibility (in my case there were minor numerical differences due > to different iteration orders). Can you give a code example? I don’t understand your case. Regards ___ Python-Dev ma

Re: [Python-Dev] set iteration order

2011-02-26 Thread Hagen Fürstenau
> Code with any dependence on the iteration order of unordered collections > (other than the guarantee that d.keys() and d.values() match at any > given time as long as d is unchanged) is buggy. It's not a matter of dependence on iteration order, but of reproducibility (in my case there were minor

Re: [Python-Dev] set iteration order

2011-02-26 Thread Terry Reedy
On 2/26/2011 4:09 AM, Hagen Fürstenau wrote: Hi, I just hunted down a change in behaviour between Python 3.1 and 3.2 to possibly changed iteration order of sets due to the optimization in issue #8685. Of course, this order shouldn't be relied on in the first place, but the side effect of the opt

[Python-Dev] set iteration order

2011-02-26 Thread Hagen Fürstenau
Hi, I just hunted down a change in behaviour between Python 3.1 and 3.2 to possibly changed iteration order of sets due to the optimization in issue #8685. Of course, this order shouldn't be relied on in the first place, but the side effect of the optimization might be worth mentioning in "What's