This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients docs@python, facundobatista, pitrou, serhiy.storchaka
Date 2020-05-03.17:25:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
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.
History
Date User Action Args
2020-05-03 17:25:40serhiy.storchakasetrecipients: + serhiy.storchaka, facundobatista, pitrou, docs@python
2020-05-03 17:25:39serhiy.storchakasetmessageid: <[email protected]>
2020-05-03 17:25:39serhiy.storchakalinkissue40486 messages
2020-05-03 17:25:39serhiy.storchakacreate