Марк Коренберг <socketp...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue12970>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to