summaryrefslogtreecommitdiffstats
path: root/Python/Python-tokenize.c
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2024-04-13 23:08:03 (GMT)
committerGitHub <noreply@github.com>2024-04-13 23:08:03 (GMT)
commita74f117dab369e6c54156c7b2256769fed0c23d0 (patch)
tree6db14d7a5be43aadca9df39cb304141f5322dcf8 /Python/Python-tokenize.c
parent3095d026424f11714f0b7a828c61dc741d4e716b (diff)
downloadcpython-a74f117dab369e6c54156c7b2256769fed0c23d0.zip
cpython-a74f117dab369e6c54156c7b2256769fed0c23d0.tar.gz
cpython-a74f117dab369e6c54156c7b2256769fed0c23d0.tar.bz2
GH-115060: Speed up `pathlib.Path.glob()` by omitting initial `stat()` (#117831)
Since 6258844c, paths that might not exist can be fed into pathlib's globbing implementation, which will call `os.scandir()` / `os.lstat()` only when strictly necessary. This allows us to drop an initial `self.is_dir()` call, which saves a `stat()`. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Diffstat (limited to 'Python/Python-tokenize.c')
0 files changed, 0 insertions, 0 deletions