Python reading file that might not exist
<p>What is the best way in python to handle reading a file that may potentially not exist?</p>

<p>Currently I have the following:</p>

<pre><code>    try:
        with open(filename, "r") as f:
            return f.read()
    except IOError:
        return False
</code></pre>

<p>Is this the best way to do it or is this wrong on any level at all?</p>

<p>I guess my biggest concerns are:</p>

<ol>
<li>Catching the exception only to return false</li>
<li>Maybe i am missing a 'Python' way of silently missing the error for a missing file</li>
</ol>
