Sorry I forgot to add the URL: https://pypi.org/project/tagged-dataclasses/
On Fri, 22 May 2020 at 20:25, Andrey Cizov <aci...@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
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/BDN2GR4LIHIEYJK3GIH2JBEADV73P44B/ Code of Conduct: http://python.org/psf/codeofconduct/