News for hackers. Stuff that matters.
Re:Python 3.7 released by j88439h84 on Thursday June 28, 2018 @12:15AM (#17414020)
Can anyone explain why you'd want to use dataclasses over attrs in real code? Attrs does everything they do and more.

"Data Classes are intentionally less powerful than attrs. There is a long list of features that were sacrificed for the sake of simplicity and while the most obvious ones are validators, converters, and __slots__, it permeates throughout all APIs."

See: http://www.attrs.org/en/stable/why.html#data-classes

Re:Python 3.7 released by Spiritus on Thursday June 28, 2018 @02:09AM (#17414473)
Because they’re in the standard library, and convenient. I would never use a third-party package just for some syntactic sugar.
Re:Python 3.7 released by j88439h84 on Thursday June 28, 2018 @03:54AM (#17414916)
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?
Re:Python 3.7 released by michaelmcmillan on Thursday June 28, 2018 @07:07AM (#17415842)
Simple != easy. It is easy to add another dependency, but you've just added another piece to the puzzle that needs to be maintained.
Re:Python 3.7 released by lozenge on Thursday June 28, 2018 @04:30AM (#17415073)
That assumes you have a project. Some people write scripts in Python to use in the shell.
Re:Python 3.7 released by icebraining on Thursday June 28, 2018 @08:35AM (#17416321)
venvs work fine in the shell. See pipsi for automatic creation/management of the necessary venvs.
Re:Python 3.7 released by eesmith on Thursday June 28, 2018 @10:19AM (#17417036)
Some people write simple programs which they then (say) email to others, or put on a blog post, or on a gist, or a SO answer.

If the simple program depends only on core Python, then they don't also have to say "oh, and also install ...".

Re:Python 3.7 released by JustSomeNobody on Thursday June 28, 2018 @04:02PM (#17420011)
It's one more thing that can break in production.