diff options
author | Pankaj Pandey <pankaj86@gmail.com> | 2022-08-26 14:20:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 14:20:48 (GMT) |
commit | c1581a928cc153076593c5c433a8dd36ce10fbfb (patch) | |
tree | 0dba5a9e164afda6a4976f76d4322bc29fdf90ab /Python/compile.c | |
parent | 771eff21a0984327a95013e2bd1d57b1f1a0e89d (diff) | |
download | cpython-c1581a928cc153076593c5c433a8dd36ce10fbfb.zip cpython-c1581a928cc153076593c5c433a8dd36ce10fbfb.tar.gz cpython-c1581a928cc153076593c5c433a8dd36ce10fbfb.tar.bz2 |
bpo-33587: inspect.getsource: reorder stat on file in linecache (GH-6805)
* inspect.getsource: avoid stat on file in linecache
The check for os.path.exists() on source file is postponed in
inspect.getsourcefile() until needed avoiding an expensive filesystem
stat call and PEP 302 module loader check is moved last for performance
since it is an uncommon case.
Diffstat (limited to 'Python/compile.c')
0 files changed, 0 insertions, 0 deletions