On 01/05/2022 06:20, Serhiy Storchaka wrote:
> The question is how to interpret value None:
>
> * Always raise TypeError (with changed message)? This is what happen
> currently when you set the method to None, this is the most compatible
> option.
> * Always raise an error, but allow to change it to more appropriate
> type (for example AttributeError for __setattr__)?
> * Interpret value None the same way as an absent attribute?
What about binary operators (__add__, __eq__, etc)? Should they act as
if they'd returned NotImplemented? Or immediately unconditionally raise
a TypeError?
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PLWKIT7FWXLKIGQXL3X5GFT3MGTC53R3/
Code of Conduct: http://python.org/psf/codeofconduct/