[Tutor] Negative IF conditions

Bob Gailer bgailer at alum.rpi.edu
Fri Feb 11 21:28:34 CET 2005

At 08:52 AM 2/11/2005, Mark Brown wrote:
>I'm a newbie and was wondering which of these IF conditions is better 

if not os.path.exists('filename'):

IMHO the above is preferable to the below. It is much more "intuitive".

if os.path.exists('filename') == False:

Bob Gailer
mailto:bgailer at alum.rpi.edu
303 442 2625 home
720 938 2625 cell 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050211/5d0a0236/attachment.htm

More information about the Tutor mailing list