Python 'none' acting weird from one version to another
<p>I'm working on an open source project. Python was upgraded, I THINK from 2.5 to 2.6, and this problem came up. </p>

<p><code>get_custom_fields(self.env)</code> was called.  self.env was None.</p>

<pre><code>def get_custom_fields(self, customfield=None):
        if not customfield:   
            ...
        else:                 
            ...
</code></pre>

<p>Previously this worked fine, and the 'if not' part went through. After the upgrade though, the else started going instead. After removing the self.env, it again goes through the first part. This fixes the problem, but I'm curious why this happened. Did the python upgrade change how optional arguments handle None for some conditionals?</p>
