How to apply bitwise operator to compare a list of objects
<p>Suppose I have a long list of objects (say, a list of numpy matrices of bool elements) <code>foo = [a, b, c]</code>, that I want to compare with some bitwise operator, to get something like <code>a | b | c</code>.</p>

<p>If I could use this bitwise operation as a function, say a <code>bitwiseor</code> function, I could simply do this with <code>bitwiseor(*foo)</code>.
However, I was not able to find whether the bitwise or can be written in such functional form.</p>

<p>Is there some handy way to handle this kind of problem? Or should I just use a loop to compare all the elements cumulatively?</p>