How to assert that zero or only one of N given arguments is passed
<p>I have a definition like this</p>

<pre><code>def bar(self, foo=None, bar=None, baz=None):
    pass
</code></pre>

<p>I want to make sure a maximum of one of foo, bar, baz is passed. I can do </p>

<pre><code>if foo and bar:
    raise Ex()

if foo and baz:
    raise Ex()
....
</code></pre>

<p>But there got be something simpler.</p>
