News for hackers. Stuff that matters.
Re:Python 3.7 released by welder on Wednesday June 27, 2018 @09:04PM (#17413249)
Data classes are awesome! No more boilerplate __init__(self) methods needed.

Another notable part of this release is type annotations:

https://www.python.org/dev/peps/pep-0560/

Re:Python 3.7 released by johnramsden on Wednesday June 27, 2018 @09:14PM (#17413317)
I love python typing, and have been using it extensively in 3.6. Great to see it in the CPython core!

I've been looking forward to trying data classes, should be nice to avoid unnecessary code.

Re:Python 3.7 released by kossae on Wednesday June 27, 2018 @09:45PM (#17413447)
> The typing module is one of the heaviest and slowest modules in the standard library even with all the optimizations made.

Have you noticed any decreases in performance using core typing?

Re:Python 3.7 released by kbd on Wednesday June 27, 2018 @10:03PM (#17413519)
For those wondering, like I was, where that quote comes from, it's from PEP 560 "Core support for typing module and generic types" - https://www.python.org/dev/peps/pep-0560/
Re:Python 3.7 released by lysp on Wednesday June 27, 2018 @10:28PM (#17413613)
Not a python coder, but from my understanding they are essentially auto-constructors?
Re:Python 3.7 released by extralego on Wednesday June 27, 2018 @11:04PM (#17413754)
Technically, no, but that is how they are written. __init__ was always called after the instance was already created. I think it was originally useful for managing inheritance and baseclass initialization, which can be handled other less hard-coded ways now. I could be wrong.