'if foo' calls getattr?!?

Joseph J. Strout joe at strout.net
Mon Aug 30 14:31:36 EDT 1999


Hi Gordon,

>In which case "if foo is not None" will be the fastest and
>closest-to-your-intention test possible. (But "if foo != None" will
>get you right back to where you are now!).

Yep, that's what I'm looking for.  (I had tried "if foo != None" 
already, but I rarely use "is" and "is not", so it didn't even occur 
to me to try.)

Thanks,
-- Joe

,------------------------------------------------------------------.
|    Joseph J. Strout           Biocomputing -- The Salk Institute |
|    joe at strout.net             http://www.strout.net              |
`------------------------------------------------------------------'




More information about the Python-list mailing list