Live data from Hacker News

Python 3.7.2 and 3.6.8 are now available

pythoninsider.blogspot.com

21–30 of 40 posts

Re: Python 3.7.2 and 3.6.8 are now available

#21

Something I've been wondering for years: I understand the rift between 2.x and 3.x.. But what is the rationale for maintaining multiple 3.x branches? And how do I choose the right branch for a fresh project? From experience, it seems like it doesn't really matter.

A major library I use doesn’t work on 3.7 yet, so still stuck on 3.6. It’s sure nice to get bug fixes and security while I wait for the PR of my library to get merged.

Very rare everyone can jump versions especially when there are syntax changes. In my case it’s around imports.

Re: Python 3.7.2 and 3.6.8 are now available

#22

Dicts now retain order now (in other words all dicts are ordered dicts). I support this, but I also guarantee this is going to bite me in the ass at least once sharing notebooks with someone on an older version of python as I expect to use this liberally. Ah well.

It's a surprisingly useful feature.

Re: Python 3.7.2 and 3.6.8 are now available

#23
post #17

Earlier quoted context omitted.

Just to clarify. This behavior is expected since 3.6: As of Python 3.6, for the CPython implementation of Python, dictionaries remember the order of items inserted. This is considered an implementation detail in Python 3.6; you need to use OrderedDict if you want insertion ordering that's guaranteed across other implementations of Python. As of Python 3.7, this is no longer an implementation detail and instead become…

CPython implementation detail vs. Python language feature remains a relatively meaningless distinction.

CPython is not the only Python interpreter out there.

Re: Python 3.7.2 and 3.6.8 are now available

#24
post #17

Earlier quoted context omitted.

Just to clarify. This behavior is expected since 3.6: As of Python 3.6, for the CPython implementation of Python, dictionaries remember the order of items inserted. This is considered an implementation detail in Python 3.6; you need to use OrderedDict if you want insertion ordering that's guaranteed across other implementations of Python. As of Python 3.7, this is no longer an implementation detail and instead become…

CPython implementation detail vs. Python language feature remains a relatively meaningless distinction.

Even if you stick purely to CPython, it still matters in that there's no guarantee that it'll still be ordered when you update (if you were reading 3.6 dicts). It's not just an implementation detail for CPython, but an implementation detail for specifically CPython 3.6 (and any other version maintaining that status).

So now that its upgraded to language feature, you can actually expect backwards compatibility in future updates.

Re: Python 3.7.2 and 3.6.8 are now available

#25

Earlier quoted context omitted.

CPython implementation detail vs. Python language feature remains a relatively meaningless distinction.

CPython is not the only Python interpreter out there.

The documentation sometimes suggests otherwise, but since there is no Python language specification, declaring something "part of the language" seems to have no meaning if it's not "implemented in CPython".

PyPy has had ordered dicts for longer than CPython, and Jython and IronPython don't look like they're ever going to support Python 3, so I'm not sure who this declaration is even even hypothetically relevant to.

Re: Python 3.7.2 and 3.6.8 are now available

#26

Something I've been wondering for years: I understand the rift between 2.x and 3.x.. But what is the rationale for maintaining multiple 3.x branches? And how do I choose the right branch for a fresh project? From experience, it seems like it doesn't really matter.

A major library I use doesn’t work on 3.7 yet, so still stuck on 3.6. It’s sure nice to get bug fixes and security while I wait for the PR of my library to get merged. Very rare everyone can jump versions especially when there are syntax changes. In my case it’s around imports.

Imports changed between 3.6 and 3.7?

Re: Python 3.7.2 and 3.6.8 are now available

#27

Something I've been wondering for years: I understand the rift between 2.x and 3.x.. But what is the rationale for maintaining multiple 3.x branches? And how do I choose the right branch for a fresh project? From experience, it seems like it doesn't really matter.

I think exactly the same. The only reasons I can imagine are that perhaps a feature can happen to be deprecated between these releases and the internals of the implementation of a particular part can change significantly and this can lead to notable change in performance of a particular algorithm some production service may rely on. As for the right choice for a fresh project - IMHO it's always the latest working version available, even a beta as long as everything you need works fine in it.

Re: Python 3.7.2 and 3.6.8 are now available

#28

Dicts now retain order now (in other words all dicts are ordered dicts). I support this, but I also guarantee this is going to bite me in the ass at least once sharing notebooks with someone on an older version of python as I expect to use this liberally. Ah well.

> Dicts now retain order now (in other words all dicts are ordered dicts).

I think you can be more clear here: all dicts are ordered by insertion order (not by key).

Re: Python 3.7.2 and 3.6.8 are now available

#29
post #22

Dicts now retain order now (in other words all dicts are ordered dicts). I support this, but I also guarantee this is going to bite me in the ass at least once sharing notebooks with someone on an older version of python as I expect to use this liberally. Ah well.

It's a surprisingly useful feature.

Hi, might you be able to give a short example? Thanks!

Re: Python 3.7.2 and 3.6.8 are now available

#30

Something I've been wondering for years: I understand the rift between 2.x and 3.x.. But what is the rationale for maintaining multiple 3.x branches? And how do I choose the right branch for a fresh project? From experience, it seems like it doesn't really matter.

For a new project you definitely want to use Python 3 as Python will be EOL in 2020.

For new projects I tend to favor Python 3.7 over 3.6. But sometimes I have to fall back to 3.6 because some packages have not been updated yet and I don't want to install them from Git(Hub) (e.g. GeoPandas through pyproj).

Post reply on HN