PEP 285: Adding a bool type

Aahz aahz at pythoncraft.com
Tue Apr 2 09:56:07 EST 2002


In article <a8bvd0$rg3$1 at slb3.atl.mindspring.net>,
Andrew Dalke <dalke at dalkescientific.com> wrote:
>Max M wrote:
>>
>>This is a common idiom:
>>
>>def f(names=None):
>>     if names == None:
>>         names = []
>>     ...
>
>Hmmm.  I would have done "if names is None".  No chance of confusing
>the object with an object that overrides __cmp__.

Yup.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list