PEP 285: Adding a bool type

Delaney, Timothy tdelaney at avaya.com
Tue Apr 2 02:39:03 EST 2002


> From: Max M [mailto:maxm at mxm.dk]
> 
> Steve Holden wrote:
> > 
> > So, is breaking bad code more excusable than breaking good code ;-)?
> 
> 
> Oh I don't think so. This is a common idiom:
> 
> def f(names=None):
>      if names == None:
>          names = []
>      ...

That should read:

def f (names=None):
    if names is None:
        names = []

:)

Tim Delaney




More information about the Python-list mailing list