◐ Shell
clean mode source ↗

GH-79634: Speed up pathlib globbing by removing `joinpath()` call. by barneygale · Pull Request #114623 · python/cpython

Remove `self.joinpath('')` call that should have been removed in 6313cdd.

This makes `PathBase.glob('')` yield itself *without* adding a trailing
slash. It's hard to say whether this is more or less correct, but at least
everything else is faster, and there's no behaviour change in the public
classes where empty glob patterns are disallowed.

@barneygale

aisk pushed a commit to aisk/cpython that referenced this pull request

Feb 11, 2024
…ll. (python#114623)

Remove `self.joinpath('')` call that should have been removed in 6313cdd.

This makes `PathBase.glob('')` yield itself *without* adding a trailing slash. It's hard to say whether this is more or less correct, but at least everything else is faster, and there's no behaviour change in the public classes where empty glob patterns are disallowed.