WikibaseIntegrator icon indicating copy to clipboard operation
WikibaseIntegrator copied to clipboard

Implement PEP 557

Open LeMyst opened this issue 4 years ago • 3 comments

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

LeMyst avatar Sep 15 '21 10:09 LeMyst

Data classes seem nice 😃

dpriskorn avatar Sep 18 '21 10:09 dpriskorn

I have tried twice using dataclasses in my tools. Both times I get weird errors and classes that are not properly initialized. I suggest we wait with dataclasses until it is a more stable feature.

dpriskorn avatar Jan 25 '22 16:01 dpriskorn

Pydantic BaseModel is a nice alternative to data classes IMO. The only caveat is that init()/post_parse_init() does not exist. You have to call it manually after instantiation. That is a minor nuisance given that everything can easily be validated.

dpriskorn avatar Jun 21 '22 07:06 dpriskorn