summaryrefslogtreecommitdiffstats
path: root/Python/Python-tokenize.c
diff options
context:
space:
mode:
authorkernc <kerncece@gmail.com>2024-03-18 15:13:02 (GMT)
committerGitHub <noreply@github.com>2024-03-18 15:13:02 (GMT)
commit52ef4430a9b3e212fe9200675cddede77b90785b (patch)
tree19f7aabd2c858add151919eb895c4577e7b1f8e1 /Python/Python-tokenize.c
parentf6cdc6b4a191b75027de342aa8b5d344fb31313e (diff)
downloadcpython-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/Python-tokenize.c')
0 files changed, 0 insertions, 0 deletions