[docs] [issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted
report at bugs.python.org
Thu Jan 14 17:24:53 EST 2016
Eryk Sun added the comment:
> That behavior on Windows is quite counterintuitive.
It's counter-intuitive from a POSIX point of view, in which anonymous files are allowed. In contrast, Windows allows any existing reference to unset the delete disposition, so the name cannot be unlinked until all references are closed.
Python tracker <report at bugs.python.org>
More information about the docs