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."
_______________________________________________
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/VJ7WPV6564BJQDNGQZXC5HPCT22SKNM4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to