On Tue, Jan 5, 2016 at 8:37 AM, Chris Barker - NOAA Federal <chris.barker@noaa.gov> wrote:
> Note that the PEP doesn't mention rglob() -- why do we even have it? It seems rglob(pat) is exactly the same as glob('**/' + path) (assuming os.sep is '/'). No TOOWTDI here?

Much as I believe in TOOWTDI, I like having rglob(). "**/" is the kind
of magic a newbie ( like me :-) ) would have research and understand.

Sure. It's too late to remove it anyway.

Is there anything actionable here besides fixing the PermissionError and the behavior under symlink loops? IMO if you want files only or directories only you can just add a filter using e.g. is_dir():

p = pathlib.Path.cwd()
real_dirs =  [p for p in p.rglob('*') if p.is_dir() and not p.is_symlink()]

--Guido van Rossum (python.org/~guido)