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 socketpair
Recipients docs@python, socketpair, vstinner
Date 2011-09-13.13:16:04
SpamBayes Score 0.00023161704
Marked as misclassified No
Message-id <1315919765.32.0.34777559758.issue12970@psf.upfronthosting.co.za>
In-reply-to
Content
Also, there is some mis-optimisation for followlinks=False: stat() and then lstat() will be called. Instead of one lstat().

Code may be rewritten as (but I don't know about cross-platform issues):
---------------------------------
if followlinks:
    mode = os.stat(path).st_mode
else:
    mode = os.lstat(path).st_mode

if stat.S_ISDIR(mode):
    dirs.append(path)
else:
    nondir.append(path)
---------------------------------
It will be much cleaner than current (or patched with my patch) implementation
History
Date User Action Args
2011-09-13 13:16:05socketpairsetrecipients: + socketpair, vstinner, docs@python
2011-09-13 13:16:05socketpairsetmessageid: <1315919765.32.0.34777559758.issue12970@psf.upfronthosting.co.za>
2011-09-13 13:16:04socketpairlinkissue12970 messages
2011-09-13 13:16:04socketpaircreate