Re:I wrote a free book about TDD and clean architecture in P...
by jimbo1qaz on Friday December 28, 2018 @10:27AM
(#18777236)
Try @attr.dataclass. It uses the cleaner 3.6+ dataclass syntax, but is more flexible (supports kw-only classes).
[ Parent
| on HN ]
Re:I wrote a free book about TDD and clean architecture in P...
by thedigicat on Monday December 31, 2018 @03:54AM
(#18793718)
Thank you both for your suggestions, I will consider using one of these in the next versions of the book. Python is a moving target, so I will have to update the examples.
Re:I wrote a free book about TDD and clean architecture in P...
by MrSaints on Wednesday January 09, 2019 @05:14AM
(#18863664)
I've recently also come across https://pydantic-docs.helpmanual.io/ which appears to be useful for enforcing simple constraints on domain entities.