(original) (raw)


On 25 Nov 2013 09:14, "Ben Hoyt" <benhoyt@gmail.com> wrote:
\>
\> >> 4) Is path\_obj.glob() recursive? In the PEP it looks like it is if the
\> >> pattern starts with '\*\*',
\> >
\> >
\> > I don't think it has to \*start\* with \*\*. Rather, the \*\* is
\> > a pattern that can span directory separators. It's not a
\> > flag that applies to the whole thing -- a pattern could have
\> > a \* in one place and a \*\* in another.
\>
\> Oh okay, that makes more sense. It definitely needs more thorough
\> documentation in that case. I would still prefer the simpler and more
\> explicit rglob() / recursive=True rather than pattern new syntax, but
\> I don't feel as strongly anymore.

Using "\*\*" for directory spanning globs is also another case of us borrowing a reasonably common idiom from \*nix systems that may not be familiar to Windows users.

Cheers,
Nick.

>
\> -Ben
\> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\> Python-Dev mailing list
\> Python-Dev@python.org
\> https://mail.python.org/mailman/listinfo/python-dev
\> Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com