And now for something only slightly different: education research shows that people process "positives" far more quickly and accurately than "negatives", so for readability I often code like:
 
if os.path.exists('filename')
    #no-operation
else
    #operation
 
YMMV, of course.
 
Ron
At 08:52 AM 2/11/2005, Mark Brown wrote:
Hi,
I'm a newbie and was wondering which of these IF conditions is better structure:

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

if os.path.exists('filename') == False:
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to