[issue45889] pathlib: Path.match does not work on paths

Ronald Oussoren report at bugs.python.org
Wed Nov 24 07:56:18 EST 2021


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

I don't think our opinions about this will converge, I'm therefore leaving this discussion.

>> would ``Path("dir/some.py").match(Path("*.py"))`` return?
>
> str(Path("*.py")) == "*.py"
>
> So no problems here.

I do think this is a problem, treating a Path like an pattern feels wrong to me.

----------

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


More information about the Python-bugs-list mailing list