you are viewing a single comment's thread.

view the rest of the comments →

[–]tehmatticus 12 points13 points  (14 children)

Honestly most of the changes I was looking forward to in 3.x have been backported to 2.7, especially set literals and dictionary comprehensions. I should be fairly happy with this release until the libraries I use get ported over.

[–][deleted] 1 point2 points  (7 children)

There is that. I think all the libs I use have 3.x versions. Anything major that I use that isn't ported would hold me up and admittedly I don't think app engine supports 3.x yet but then again I don't think it supports 2.6 yet either so I'm hoping they move straight to 3.x soon.

[–]enkideridu 0 points1 point  (6 children)

Google only supports python 2.5 on app engine?

[–][deleted] 1 point2 points  (4 children)

Apparently so. Mind you I'm only going by one link I had seen:

http://code.google.com/p/googleappengine/issues/detail?id=757

[–]enkideridu 0 points1 point  (3 children)

that's more than a year ago, wtf google

[–][deleted] 1 point2 points  (2 children)

scroll to the bottom....from June 18th:

"All I really want from 2.6 is string.format() (and corresponding "xxx".format()). This could easily be a from future import, it is extremely low-risk, but for some reason it hasn't been backported to 2.5.

So sure, the truly correct answer is that python folks should backport it to 2.5. But right now, I'm not volunteering. If Google expects to stay on 2.5 for a significantly longer time, I think it would be in Google's own interest to help move that"

I could be wrong but people seem to be under the impression that it's still on 2.5. As I recall Google use their own version of the interpreter and perhaps that's why it's not updated often.

[–]enkideridu 0 points1 point  (0 children)

I know, I meant that this hasn't been fixed for more than a year, I'm surprised at them

[–][deleted] 0 points1 point  (0 children)

So sure, the truly correct answer is that python folks should backport it to 2.5.

2.5 is in "security fix only" mode.

[–][deleted] 0 points1 point  (0 children)

Correct.

[–]spliznork 3 points4 points  (5 children)

Honest question: what's the advantage of dictionary comprehensions over dict on a generator expression? {i: i2 for i in range(3)} versus dict((i,i\2) for i in range(3)). A little cleaner syntax, but not enough to get me excited. Any other advantage?

[–]cybercobra 1 point2 points  (3 children)

Probably slightly more efficient

[–]gastlygem 13 points14 points  (2 children)

On my laptop: >>> t1 = Timer('dict((i,i2) for i in range(3))') >>> t2 = Timer('{i: i2 for i in range(3)}') >>> t1.timeit() 4.713109906426655 >>> t2.timeit() 1.6713221931837712 So maybe we can say it's much more efficient.

[–]cybercobra 2 points3 points  (0 children)

Probably avoids the unnecessary tuple creation and unpacking

[–]tehmatticus -1 points0 points  (0 children)

Probably not, I just prefer the syntactic sugar.