patch updated<br><br><br>-tomer<br><br><div><span class="gmail_quote">On 11/21/06, <b class="gmail_sendername">Guido van Rossum</b> <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think it would set a good example if __bool__ was *required* to<br>return exactly True or False and no other object, not even int<br>instances equal to 0 or 1. Surely that can't be much of a burden. Feel<br>free to upload an improved patch.
<br><br>On 11/21/06, Walter Dörwald <<a href="mailto:walter@livinglogic.de">walter@livinglogic.de</a>> wrote:<br>> Guido van Rossum wrote:<br>> > On 11/21/06, Ivan Krstiæ <<a href="mailto:krstic@solarsail.hcs.harvard.edu">
krstic@solarsail.hcs.harvard.edu</a>> wrote:<br>> >> Guido van Rossum wrote:<br>> >>> Can anyone help out evaluating this patch? If it has to wait for me<br>> >>> it's gonna be a looooooong wait...
<br>> >> Looks fine to me functionally, although it seems to gratuitously retab<br>> >> some code that used to be aligned with tabstop 8 to a tabstop of 4.<br>> ><br>> > Thanks! I hope you meant "indentation level" instead of "tabstop".
<br>> > Tomer, can you fix the indentation to be whatever's prevailing in the<br>> > file you're editing?<br>><br>> Another question is whether __bool__() should be allowed to return an<br>> int (or any other object), or if it *must* be a bool. (The patch
<br>> currently allows ints). What if __bool__() returns subclasses of int,<br>> that overwrite __bool__() themself?<br>><br>> Servus,<br>> Walter<br>><br>><br><br><br>--<br>--Guido van Rossum (home page:
<a href="http://www.python.org/~guido/">http://www.python.org/~guido/</a>)<br></blockquote></div><br>