summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2024-02-10 18:12:34 (GMT)
committerGitHub <noreply@github.com>2024-02-10 18:12:34 (GMT)
commit6f93b4df92b8fbf80529cb6435789f5a75664a20 (patch)
tree9847e44bb89c24c38f5217dada3fdfc83344a376 /Python/sysmodule.c
parent9d1a353230f555fc28239c5ca1e82b758084e02a (diff)
downloadcpython-6f93b4df92b8fbf80529cb6435789f5a75664a20.zip
cpython-6f93b4df92b8fbf80529cb6435789f5a75664a20.tar.gz
cpython-6f93b4df92b8fbf80529cb6435789f5a75664a20.tar.bz2
GH-115060: Speed up `pathlib.Path.glob()` by removing redundant regex matching (#115061)
When expanding and filtering paths for a `**` wildcard segment, build an `re.Pattern` object from the subsequent pattern parts, rather than the entire pattern, and match against the `os.DirEntry` object prior to instantiating a path object. Also skip compiling a pattern when expanding a `*` wildcard segment.
Diffstat (limited to 'Python/sysmodule.c')
0 files changed, 0 insertions, 0 deletions