I frequently use each of namedtuples and data classes in contexts where the
other one would not be appropriate. Yes, I also sometimes use an object
where either would serve... In those cases, mostly SimpleNamespace would
likewise be fine. So would a one line class definition.

On Wed, Jul 28, 2021, 4:54 PM <pa...@lexyr.com> wrote:

> It's not actually that, although that's a good point you are making. I
> found myself using both of them not because one is more useful in certain
> cases and the other in others in small and niche ways. Both of the times I
> just used the latest one that came to mind. The fact that two different
> classes in two different modules have similar enough APIs that one could
> easily substitute one for another or vice versa without second thought
> depending on which StackOverflow answer comes up higher in the search (to
> oversimplify) with very little breaking doesn't sit well with me at all.
> _______________________________________________
> 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/W6QJSSQDTAGQU3347LLGSEZ7LBRNHDKM/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
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/Q3AY4FN7I3GUCY2K3MCPEIHQOGE6DD4M/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to