News for hackers. Stuff that matters.
Re:Released: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 by ComputerGuru on Wednesday April 11, 2012 @07:29PM (#3830182)
I'm both very much surprised and disappointed that this feature is disabled by default and needs to be explicitly turned on.

Honestly, if the spec doesn't guarantee that iteration will be in order, no one has a right to complain if it actually isn't with this release.

In the C++ world I come from, the Spec is treated as being holy. You don't write code that invokes undefined behavior or relies on unspecified behavior. If you do, you're on your own and no one will touch your code with a ten foot pole if they can help it. (Unless, of course, there really is no other way due to your compiler, etc. etc. in which case you litter the comments with warnings)

In this particular case, it's a simple matter of choosing the right data structure to suit your needs, or sorting contents before accessing them if you truly require in-order iteration.

Re:Released: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 by ywrkdl on Wednesday April 11, 2012 @10:27PM (#3830733)
>In the C++ world I come from, the Spec is treated as being holy.

That's ridiculous.

>You don't write code that invokes undefined behavior or relies on unspecified behavior.

This happens all the time, and not only is code written that relies on unspecified behavior, vendors maintain backward compatibility for programs that do this.

http://www.joelonsoftware.com/articles/APIWar.html

> If you do, you're on your own and no one will touch your code with a ten foot pole if they can help it.

Not really. If you do this and you're a huge success, you're the center of the universe. If you do this and no one notices, you're fucked.

Re:Released: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 by ComputerGuru on Thursday April 12, 2012 @02:43AM (#3831293)
Software APIs are one thing, the C/C++ spec is another. The latter undergoes revision after revision through hundreds of publicly released drafts and after years and years of planning and experimentation. The former is subject to the whims and caprices of whomever's software you're using.
Re:Released: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 by durin42 on Wednesday April 11, 2012 @09:25PM (#3830538)
As one who complained directly this being off-by-default to some python-dev folks, one small reason it's off-by-default in the bugfix releases is because it's likely to break people's tests if they use doctest. Pretty much everyone I've talked to sees this as an argument against doctest on at least some level.

IIRC there were also larger concerns about poorly implemented systems that depended on hash() being stable for persistence reasons. I don't know the details of that, as I appreciate the nod to backwards compatibility and not breaking people on a bugfix release.

Re:Released: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 by obtu on Thursday April 12, 2012 @06:08AM (#3831739)
I was looking for something in the announcement that warns people that the flag will be on in the next major release. “Told you so (in specific detail)” is a good argument to oppose to users who didn't fix their doctests.
Re:Released: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 by eevee on Wednesday April 11, 2012 @07:44PM (#3830224)
JSON objects are explicitly unordered, but you would be amazed by how many gripes I've seen about JSON libraries or systems that don't preserve the order.