Message367987
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. |
|
| Date |
User |
Action |
Args |
| 2020-05-03 17:25:40 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, facundobatista, pitrou, docs@python |
| 2020-05-03 17:25:39 | serhiy.storchaka | set | messageid: <[email protected]> |
| 2020-05-03 17:25:39 | serhiy.storchaka | link | issue40486 messages |
| 2020-05-03 17:25:39 | serhiy.storchaka | create | |
|