[Python-Dev] PEP 428 - pathlib API questions (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Mon Nov 25 00:35:29 CET 2013
- Previous message: [Python-Dev] PEP 428 - pathlib API questions
- Next message: [Python-Dev] PEP 428 - pathlib API questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 25 Nov 2013 09:14, "Ben Hoyt" <benhoyt at gmail.com> wrote:
>> 4) Is pathobj.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 at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20131125/d2237aa7/attachment.html>
- Previous message: [Python-Dev] PEP 428 - pathlib API questions
- Next message: [Python-Dev] PEP 428 - pathlib API questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]