![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Facundo Batista <facundo@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 <report@bugs.python.org> <https://bugs.python.org/issue40486> _______________________________________