New submission from Facundo Batista <facu...@taniquetil.com.ar>:

Documentation for Path.iterdir ( 
https://docs.python.org/3/library/pathlib.html#pathlib.Path.iterdir ) doesn't 
specify what happens when the directory change.

This is important, as the function does NOT return a list (which would imply 
that a "snapshot" of the directory will be returned).

Also, it's not only relevant what would happen if somebody else changes the 
directory after the iteration is started (will that change be reflected?) but 
also if it's ALLOWED for the same code that iterates the dir content to change 
it (or problems would arise, like when changing a dictionary while being 
iterated).

----------
assignee: docs@python
components: Documentation
messages: 367981
nosy: docs@python, facundobatista
priority: normal
severity: normal
status: open
title: pathlib's iterdir doesn't expecify what happens if directory content 
change
versions: Python 3.9

_______________________________________
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