[Tutor] Two Questions...(i) Checking for None (ii) Making commandline arguments mutually exclusive

Dustin J. Mitchell dustin at v.igoro.us
Sat Nov 4 19:30:05 CET 2006


> if x == None
> 
> As simple as that.

In fact, I think the following is even a little more readable:

  if x is None

and in fact that syntax has some advantages in various corner cases.  It's
largely a matter of preference.

Dustin


More information about the Tutor mailing list