13 Sep
2011
13 Sep
'11
1:16 p.m.
Марк Коренберг <socketpair@gmail.com> added the comment: 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 ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue12970> _______________________________________