Laurie Opperman <laurie_opper...@hotmail.com> added the comment:

Having `iterdir(recursive=True)` recurse into symlinks to directories would 
mean we would either not yield those symlinks, or we yield those symlinks and 
all other directories.

I feel like not yielding directories is the way to go, but it's easy enough to 
check if a yielded path is a directory in application code.

The current implementation of using recursion to list subdirectory contents 
doesn't seem to allow for the obvious implementation of symlink 
cycle-detection: keeping track of which (real) directories have been listed.

PS: I've updated the pull-request to not follow symlinks to directories. This 
is not a final decision, but just updating to be in line with what I've implied 
up to this point

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36602>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to