Barney Gale <barney.g...@gmail.com> added the comment:

Less reliable how? Doesn't appear any slower:

barney.gale@heilbron:~$ python3 -m timeit -s "import os; 
os.listdir('/usr/local')"
100000000 loops, best of 3: 0.0108 usec per loop
barney.gale@heilbron:~$ python3 -m timeit -s "import os; 
list(os.scandir('/usr/local'))"
100000000 loops, best of 3: 0.00919 usec per loop

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39907>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to