On Thu, Jul 29, 2021 at 9:19 PM Joren Hammudoglu <jhammudo...@gmail.com> wrote: > > What about creating a dataclasses.datatuple decorator, that replaces > typing.NamedTuple, and offers the same (or restricted) interface as regular > dataclasses? This would make the distinction explicit between a mutable, > object-like dataclass, and the immutable, tuple-like named-/datatuple. With > this, we could also get rid of the fake-immutable frozen dataclasses. > In the same way, a dataclasses.datadict could replace typing.TypedDict, which > is very limited at this point anyway. > > So instead of trying to merge different concepts, let's use one create one > interface to rule them all. Because, after all: > "There should be one-- and preferably only one --obvious way to do it." >
https://xkcd.com/927/ ChrisA _______________________________________________ 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/NE463OYDFDPAGCX76X5WYBSYBIYQNESL/ Code of Conduct: http://python.org/psf/codeofconduct/