Author nickpapior
Recipients nickpapior, ronaldoussoren
Date 2021-11-24.12:38:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It basically checks that some part of the path is the same as some part of a reference path, they need not have the same complete parent which is why the resolve command would negate this comparison always.


As for your last example, that will be quite easily handled:

> would ``Path("dir/").match(Path("*.py"))`` return?

str(Path("*.py")) == "*.py"

So no problems here.

It would even allow users for easier combination of patterns

suffix_path = Path("*.py")

if path.match("home" / suffix_path):
   <process this>
elif path.match("other" / suffix_path):
   <process this>

The equivalent code would have been:

suffix_path = "*.py"
if path.match(os.path.join("home", suffix_path):
   <process this>
elif path.match(os.path.join("other", suffix_path):
   <process this>

I think the former does not infer any confusion, nor does it seem to me to introduce anything that contradicts the meaning of match/glob/rglob.
Date User Action Args
2021-11-24 12:38:57nickpapiorsetrecipients: + nickpapior, ronaldoussoren
2021-11-24 12:38:57nickpapiorsetmessageid: <>
2021-11-24 12:38:57nickpapiorlinkissue45889 messages
2021-11-24 12:38:56nickpapiorcreate