This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Arfrever, barry, eric.smith, eric.snow, georg.brandl, giampaolo.rodola, loewis, nadeem.vawda, neologix, pitrou, python-dev, rhettinger, terry.reedy
Date 2011-12-07.22:20:27
SpamBayes Score 0.0014376222
Marked as misclassified No
Message-id <1323296428.65.0.948149726765.issue11051@psf.upfronthosting.co.za>
In-reply-to
Content
I am a little puzzled by the patch. In logic, 'A and B' is equivalent to 'not A or not B'. But in the patch,

-            if (_Py_stat(filename, &statbuf) == 0 &&  /it exists */
-                S_ISDIR(statbuf.st_mode)) /* it's a directory */
+            if (_Py_stat(filename, &statbuf) != 0 || S_ISDIR(statbuf.st_mode))

you seem to change to 'not A or B', without negating B. Is this intentional? What am I missing? Some subtle effect of lazy evaluation? Or an intentional change in the logic?
History
Date User Action Args
2011-12-07 22:20:28terry.reedysetrecipients: + terry.reedy, loewis, barry, georg.brandl, rhettinger, pitrou, eric.smith, giampaolo.rodola, nadeem.vawda, Arfrever, neologix, python-dev, eric.snow
2011-12-07 22:20:28terry.reedysetmessageid: <1323296428.65.0.948149726765.issue11051@psf.upfronthosting.co.za>
2011-12-07 22:20:28terry.reedylinkissue11051 messages
2011-12-07 22:20:27terry.reedycreate