This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jackdied
Recipients
Date 2006-11-22.23:35:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 15:55:24adminlinkissue1600346 messages
2007-08-23 15:55:24admincreate