Live data from Hacker News

Python 3.7 released

python.org

51–56 of 56 posts

Re: Python 3.7 released

#51

Earlier quoted context omitted.

Because they’re in the standard library, and convenient. I would never use a third-party package just for some syntactic sugar.

I don't understand the inconvenience. Isn't it just adding `attrs` to requirements.txt once for the whole project, and then you get more features ever after?

It's one more thing that can break in production.

Re: Python 3.7 released

#52
post #8

Notable parts of this release (IMO): * Data classes ( https://docs.python.org/3.7/library/dataclasses.html ) * New breakpoint() builtin ( https://docs.python.org/3.7/library/functions.html#breakpoin... ) * Dictionaries preserve insertion order. (Implemented in 3.6, but now is part of the official spec.)

> Dictionaries preserve insertion order. (Implemented in 3.6, but now is part of the official spec.)

That is a terrible decision. Call me a heretic.

Yes, I know it's a side effect of bringing in the bitmap index version from PyPy. Yes, I am aware that collections.OrderedDict is now an alias to internal dictionary type. And yes, I do understand that randomising the key traversal order could incur a performance penalty.

But a dictionary where keys come out in anything other than unspecified order is a subtle trap just waiting to blow up. I personally prefer golang's map behaviour - keys are always in unspecified order, and the order is different even between calls.

Re: Python 3.7 released

#53

Hey, does anyone know where to find information about how python's releases are structured? For example, 3.6 exists and 3.7 is released. Without looking at the release details, should I be upgrading? Should I assume that it will break stuff, or assume that it won't, or should I make no assumptions? Etc...

I personally never encounter that. However, there is a breaking stuff in this release: await and async are now keywords. This means that although they were part syntax we could make variable variables with these name until 3.6 but now it is not allowed.

Re: Python 3.7 released

#55
post #52
post #8

Notable parts of this release (IMO): * Data classes ( https://docs.python.org/3.7/library/dataclasses.html ) * New breakpoint() builtin ( https://docs.python.org/3.7/library/functions.html#breakpoin... ) * Dictionaries preserve insertion order. (Implemented in 3.6, but now is part of the official spec.)

> Dictionaries preserve insertion order. (Implemented in 3.6, but now is part of the official spec.) That is a terrible decision. Call me a heretic. Yes, I know it's a side effect of bringing in the bitmap index version from PyPy. Yes, I am aware that collections.OrderedDict is now an alias to internal dictionary type. And yes, I do understand that randomising the key traversal order could incur a performance penalty…

Personally I feel it is perfectly in line with one of Python’s core mentality, “We’re all grown-ups here.” The bahaviour is like Python lacking real access control: If you don’t think about it, it does not matter[#]; if you need it, it’s incredibly useful. You may not like it, and that’s fine, we agree to disagree.

[#]: Well, usually it doesn’t matter, and when it does, you have other ways to achieve similar results.

Post reply on HN