On Tue, 26 Apr 2022 at 09:00, <aanonyme.perso...@hotmail.fr> wrote:
>
> This is useful in the context of reducing the available methods and operator 
> overloading, when subclassing a type.
> Typically, when subclassing a NamedTuple type, you often don't want the <, >, 
> <=, >=, + or * operators to work, so in that case you would want for the 
> related methods to return NotImplemented.
>

Normally, when you subclass a namedtuple, it's because you want a
tuple. Do you perhaps want a dataclass instead?

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

Reply via email to