Author nickpapior
Recipients nickpapior
Date 2021-11-24.07:54:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org>
In-reply-to
Content
The documentation of Path.match only says it will match a pattern.

But quite often this pattern may be desirable to have as a Path as well.

import pathlib as pl

path = pl.Path("foo/bar")
print(path.match("bar"))
print(path.match(pl.Path("bar")))

However, the last one fails and one has to resort to 

print(path.match(str(pl.Path("bar"))))

which in my opinion is a little misleading.

I couldn't find any other bug/enhancement report of this. Also, this probably also targets later versions.
History
Date User Action Args
2021-11-24 07:54:31nickpapiorsetrecipients: + nickpapior
2021-11-24 07:54:31nickpapiorsetmessageid: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org>
2021-11-24 07:54:31nickpapiorlinkissue45889 messages
2021-11-24 07:54:31nickpapiorcreate