May 1, 2022
3:01 p.m.
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?