Message134155
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. |
|
Date |
User |
Action |
Args |
2011-04-20 14:23:09 | francescor | set | recipients:
+ francescor, rhettinger, eric.araujo, lregebro, python-dev, javawizard |
2011-04-20 14:23:09 | francescor | set | messageid: <1303309389.25.0.226449353823.issue10042@psf.upfronthosting.co.za> |
2011-04-20 14:23:08 | francescor | link | issue10042 messages |
2011-04-20 14:23:07 | francescor | create | |
|