Message 143967 - Python tracker
Message143967
| 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:05 | socketpair | set | recipients: + socketpair, vstinner, docs@python |
| 2011-09-13 13:16:05 | socketpair | set | messageid: <1315919765.32.0.34777559758.issue12970@psf.upfronthosting.co.za> |
| 2011-09-13 13:16:04 | socketpair | link | issue12970 messages |
| 2011-09-13 13:16:04 | socketpair | create | |