pathlib.Path.match() is documented as:
Match this path against the provided glob-style pattern
Under Path.glob it says:
The “
**
” pattern means “this directory and all subdirectories, recursively”.
Is that supposed to work with match()
as well? It seems that would be very useful, but either it’s broken or I don’t understand how it works.
>>> pathlib.Path("x/a.b").match("x/**/*.*")
False
>>> pathlib.Path("x/y/a.b").match("x/**/*.*")
True
>>> pathlib.Path("x/y/z/a.b").match("x/**/*.*")
False
Should these not all be True?