On 01/05/2022 06:20, Serhiy Storchaka wrote:
What about binary operators (__add__, __eq__, etc)? Should they act as if they'd returned NotImplemented? Or immediately unconditionally raise a TypeError?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?
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/PLWKIT7FWXLKIGQXL3X5GFT3MGTC53R3/ Code of Conduct: http://python.org/psf/codeofconduct/