[issue29249] Pathlib glob ** bug

Miroslav Šedivý report at bugs.python.org
Fri Dec 4 16:54:33 EST 2020


Miroslav Šedivý <miro at sedivy.de> added the comment:

Today when porting some random project from os.path to pathlib I encountered a homemade filename matching method that I wanted to port to pathlib.Path.match. Unfortunately

>>> pathlib.Path('x').match('**/x')
False

although if I have a file called `x` in the current directory, both

>>> pathlib.Path('.').glob('**/x')

and zsh's

$ ls **/x

can find it. It would be really nice to have analogous .glob and .match methods.

----------
nosy: +eumiro

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29249>
_______________________________________


More information about the Python-bugs-list mailing list