Loading empty dictionary when YAML file is empty (Python 3.4)
<p>I have a YAML file that is empty, and when I load it in, I would like to load it in as an empty dictionary. For example, I have</p>

<pre><code>import yaml
with open('an_empty_file.yml', 'r') as config_file:
    config=yaml.load(config_file)
    print(config) 
None
</code></pre>

<p>It turns out that <code>yaml.load(config_file)</code> will return a <code>NoneType</code> object, which I suppose makes sense. Is there an easy way to just return an empty dictionary?</p>