Python best way to check for existing key
<p>Which is the more efficient/faster/better way to check if a key exists?</p>

<pre><code>if 'subject' in request.POST:
    subject = request.POST['subject']
else:
    // handle error
</code></pre>

<p>OR</p>

<pre><code>try:
    subject = request.POST['subject']
except KeyError:
    // handle error
</code></pre>
