Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globbing with glob vs. pathlib #16

Open
gpoore opened this issue Feb 5, 2018 · 1 comment
Open

Globbing with glob vs. pathlib #16

gpoore opened this issue Feb 5, 2018 · 1 comment

Comments

@gpoore
Copy link

gpoore commented Feb 5, 2018

It might be worth mentioning that glob.glob and pathlib.Path.glob work slightly differently. glob.glob treats dotfiles specially, while pathlib.Path.glob uses ** only to match directories, not files. It's easy to use pathlib.Path.glob without reading the docs closely enough to realize the differences from glob.glob and bash globstar behavior, and thus construct a pattern that doesn't match what you want.

@arogozhnikov
Copy link
Owner

arogozhnikov commented Feb 11, 2018

Thanks, I didn't know this, so will add a remark.

Edit: added a remark, I think some examples would help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants