Message51393
I don't have sf permissions so I put a tweaked version of the patch
at http://jackdied.com/static/bool6.patch
* keeps slots_nb_bool closer to the original
* extra test in test_bool to exercise __len__ fallbacks
* test_iter and test_decimal pass
* reverted longobject.c indentation
The regular __len__ machinery does get called but the 2.5 code does
the bool/int check either way because it made the code shorter
(both __len__ and __nonzero__ could return an int so doing
the same check for both didn't hurt anything). The new patch
treats the result of __len__ and __bool__ slightly differently
because __bool__ must return __bool__. I added a couple lines
but otherwise left the function as it was (so the lookup_maybe()s
should be fine)
If there are no objections I'll check it in. |
|
Date |
User |
Action |
Args |
2007-08-23 15:55:24 | admin | link | issue1600346 messages |
2007-08-23 15:55:24 | admin | create | |
|