testing array of logicals

H J van Rooyen mail at microcorp.co.za
Mon Aug 7 02:38:21 EDT 2006


 "Janto Dreijer" <jantod at gmail.com> wrote:


|
| Janto Dreijer wrote:
| > John Henry wrote:
| > > Simon Forman wrote:
| > > > >
| > > > > False not in logflags
| > > > >
| > > >
| > > > Or, if your values aren't already bools
| > > >
| > > > False not in (bool(n) for n in logflags)
| > >
| > > Very intriguing use of "not in"...
| >
| > Is there a reason why you didn't write
| >  True in (bool(n) for n in logflags)
|
| <slaps forehead> doh! Never mind.
|

 *lol* - don't feel bad about this - real programmers make this mistake with a
varying frequency -
>From once every six days or so if you are no good, to once in a lifetime if
you are brilliant, and never only if you are a genius...

First time it bit me I was an apprentice writing in Cobol.

- Hendrik





More information about the Python-list mailing list