Paul Ganssle <p.gans...@gmail.com> added the comment:

> Is the behaviour you're proposing any different from using Path.rglob('*')?

I believe `rglob("*")` is eager, while `iterdir` is lazy.

@Epic_Wink:
> This would be trivial to implement as 'iterdir' can simply yield from 
> subdirectories' 'iterdir'.

One thing you may need to worry about here is the fact that symlinks can have 
cycles, so you may need to do some cycle detection to avoid creating the 
dangerous possibility of infinite loops.

There's also the question of whether you want this to be a depth-first or 
breadth-first traversal, and whether you would want both of these to be options.

----------
nosy: +p-ganssle

_______________________________________
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