diff options
| author | kernc <kerncece@gmail.com> | 2024-03-18 15:13:02 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-18 15:13:02 (GMT) |
| commit | 52ef4430a9b3e212fe9200675cddede77b90785b (patch) | |
| tree | 19f7aabd2c858add151919eb895c4577e7b1f8e1 /Python/optimizer_cases.c.h | |
| parent | f6cdc6b4a191b75027de342aa8b5d344fb31313e (diff) | |
| download | cpython-52ef4430a9b3e212fe9200675cddede77b90785b.zip cpython-52ef4430a9b3e212fe9200675cddede77b90785b.tar.gz cpython-52ef4430a9b3e212fe9200675cddede77b90785b.tar.bz2 | |
gh-71765: Fix inspect.getsource() on empty file (GH-20809)
* bpo-27578: Fix inspect.getsource() on empty file
For modules from empty files, `inspect.getsource()` now
returns an empty string, and `inspect.getsourcelines()` returns
a list of one empty string, fixing the expected invariant.
As indicated by `exec('')`, empty strings are valid Python
source code.
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Diffstat (limited to 'Python/optimizer_cases.c.h')
0 files changed, 0 insertions, 0 deletions
