[Tutor] Re: Negative IF conditions

Andrei project5 at redrival.net
Fri Feb 11 20:07:23 CET 2005


Mark Brown wrote:
> I'm a newbie and was wondering which of these IF conditions is better 
> structure:
> 
>    1. if not os.path.exists('filename'):
>    2. if os.path.exists('filename') == False:

I prefer the "if not" variety.

Yours,

Andrei



More information about the Tutor mailing list