
22 May
2020
22 May
'20
10:01 p.m.
Sorry I forgot to add the URL: https://pypi.org/project/tagged-dataclasses/
On Fri, 22 May 2020 at 20:25, Andrey Cizov acizov@gmail.com wrote:
I have developed a library to introduce tagged unions to python that uses dataclasses to define disjoint members of the tagged union (by defining them as Optional fields). With some additional validation I make sure that only one of the fields is not None.
I find that it also fits well with the existing analysis tools and IDEs (e.g. PyCharm) and doesn’t require any additional work in order to be supported.
I would like to see some criticism and whether that could potentially be a good candidate for python standard library in the future.
-- Andrey Cizov
--
Andrey Cizov