Boolean tests [was Re: Attack a sacred Python Cow]
Erik Max Francis
max at alcyone.com
Wed Jul 30 08:07:28 CEST 2008
Russ P. wrote:
> All this discussion about "if x" has me wondering. I use it all the
> time because a fully explicit test just seems redundant. But maybe it
> does have some value in terms of readability and type checking. After
> all, it is possible to forget whether something is a number or a list.
> Having said that, it would sure be nice to be able to write
> if myList is not empty:
I sure hope that's a joke. `x is not y` means something quite different.
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
The doors of Heaven and Hell are adjacent and identical.
-- Nikos Kazantzakis
More information about the Python-list