Shortcut for method parameter
<p>I was wondering if there was a way to do something like this in Python:</p>

<pre><code>some_method(param1="param1", param2 = somevar or None)
</code></pre>

<p>I want to pass the param2 if somevar is set, or None if it isn't. Basically I am looking for a shorter way of doing this:</p>

<pre><code>if somevar is None:
some_method(param1="param1")
else:
some_method(param1="param1", param2=somevar)
</code></pre>
