New submission from Nick Papior <nickpap...@gmail.com>:
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. ---------- components: Library (Lib) messages: 406910 nosy: nickpapior priority: normal severity: normal status: open title: pathlib: Path.match does not work on paths type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45889> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com