News for hackers. Stuff that matters.
Re:Things to use in Python 3 by DonaldPShimoda on Wednesday May 15, 2019 @01:19AM (#19916616)
> Data classes sounds good but there should be only one way to do things

Dataclasses greatly simplify generation of simple classes which are unnecessarily filled with boilerplate. I'd argue that they are the one way to do this, and that choosing to manually implement the same naive `__init__` function for every simple class you write is the "wrong" way.

(Here I take "simple class" to mean a class which takes in some values during initialization and stores them without anything terribly interesting going on during that initialization. A simple class can have methods defined on it, though.)

> type-hints are ok for very very big projects.

D:

> No comment on implicit-namespace-packages yet as still trying to understand solid use-case.

I think it's just... trying to keep your directories "clean"? I also don't really understand the use of this haha.

Re:Things to use in Python 3 by croh on Wednesday May 15, 2019 @01:46AM (#19916744)
> Dataclasses greatly simplify generation of simple classes which are unnecessarily filled with boilerplate

I would love to solve these boilerplate kinds of problems using plugging like emmets. Magic like this feels good when writing but troubles during debugging and customizing.

Additionally naive programmers always use such features in wrong situation if they don't get use-case. I really feel sad after seeing so much bad-django-code in production.