testing array of logicals

Simon Brunning simon at brunningonline.net
Thu Jul 13 05:19:12 EDT 2006


On 12 Jul 2006 11:14:43 -0700, John Henry <john106henry at hotmail.com> wrote:
> Is there a more elagant way of doing this?
>
> # logflags is an array of logicals
> test=True
> for x in logflags:
>    test = test and x
> print test

min(logflags)

I feel dirty now. ;-)

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list