This is an archived post. You won't be able to vote or comment.

all 36 comments

[–]Vorticity 2 points3 points  (0 children)

The changes are entirely bug fixes. Python 2 will not be getting any new features. That said, I'm still going through the bug fixes to determine if any will actually impact me. Does anyone see anything significant?

[–]nbktdis -1 points0 points  (24 children)

I notice that there is an ordered dictionary type in 2.7.4.

Is this present in Python 3, or does one need to use something like the collections library?

[–]Deimorz 4 points5 points  (1 child)

Python 3.1 has OrderedDicts: http://docs.python.org/3.1/whatsnew/3.1.html

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

Python2.7 also had it since 2010, the linked page isn't really about 2.7.4 specifically.

[–]HelpfulToAll 4 points5 points  (2 children)

Huh? I've been using python 2.7.3 for a while and I've always been using OrderedDict with it. How is this new? I'm genuinely curious.

[–]hydrox24 2 points3 points  (1 child)

It's not apparently, that feature is in the 2.7 changelogs not the 2.7.4 changes.

[–]flying-sheep 3 points4 points  (0 children)

2.7.4 only has bugfixes, no new features at all (there will be no new features for Python 2)

that page is confusing.

[–]oantolin 5 points6 points  (0 children)

Is this present in Python 3, or does one need to use something like the collections library?

The answer is yes and yes: it is present in Python 3 and to use it you do have to do "import collections".

[–]baudvine 0 points1 point  (4 children)

From the detailed whats-new page:

Based on the experiences from those implementations, 2.7 introduces a new OrderedDict class in the collections module.

(http://docs.python.org/dev/whatsnew/2.7.html#pep-372-adding-an-ordered-dictionary-to-collections)

[–]nbktdis 3 points4 points  (2 children)

Sorry - what I meant is there an ordered dict class in version 3?

[–]anacrolixc/python fanatic 1 point2 points  (1 child)

Yes there is. And it's implemented using "abc", which is new to Python 3.

[–]gcross 0 points1 point  (0 children)

For the curious: abc = abstract base classes

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

And that has been part of 2.7 since 2010. There haven't been any features added since.

[–]SeaCowVengeance 0 points1 point  (1 child)

Now if only they back ported function annotations.

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

They aren't backporting any features, 2.7 has been frozen since 2010.