2 ms·
Design-by-contract, perhaps? There are a couple libraries like this currently, and you could pretty easily write your own framework for it. Also, Attrs and Pyd
by nerdponx 5y ago
Design-by-contract, perhaps? There are a couple libraries like this currently, and you could pretty easily write your own framework for it.
Also, Attrs and Pydantic both support arbitrary additional validation on fields.