Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

There is no principal difference between Path.iterdir() and os.listdir(). 
Somebody can change the directory during iteration. The only difference is that 
in the latter case you iterate in C instead of Python, so it is less easy to 
catch a race condition. What would happen is OS and FS specific. Depending on 
OS and FS it may be even possible to get the same name several times when 
somebody quickly creates and removes entities in the directory.

----------
nosy: +serhiy.storchaka

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

Reply via email to