Why bool( object )?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Fri May 1 05:30:21 EDT 2009
On Fri, 01 May 2009 16:30:19 +1200, Lawrence D'Oliveiro wrote:
> I have never written anything so unbelievable in my life. And I hope I
> never will.
I didn't say you did. If anyone thought I was quoting Lawrence's code,
I'd be surprised. It was not my intention to put words into your mouth.
But seeing as you have replied, perhaps you could tell us something.
Given so much you despise using non-bools in truth contexts, how would
you re-write my example to avoid "a or b or c"?
for x in a or b or c:
do_something_with(x)
--
Steven
More information about the Python-list
mailing list