Francesco Ricciardi <francescor2...@yahoo.it> added the comment:

I think the whole issue is indeed how NotImplemented is treated. To me saying 
that 'not NotImplemented' is True is wrong. About the stack overflow I found 
there are various possible fixes, however none will nice.

By definition, NotImplemented is the way that a method or operation have to 
signal to the interpreter that it doesn't know how to handle given operand 
types. IMHO, it shouldn't be possible to receive NotImplemented as operand 
value, and it shouldn't have a boolean value. Indeed, t should be handled as a 
special case by the interpreter.

To go further, I am not really sure that NotImplemented should be a return 
value. Probably, an exception that is trapped by the interpreter when 
evaluating an expression would be easier to define and handle.

Of course, such a change should be deeply grokked before being put in place, 
also because of the high impact on code that already relies on NotImplemented 
having a value.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10042>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to