diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-04-16 22:37:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 22:37:18 (GMT) |
commit | dd4383f3c12fc938a445d974543f897c3fc07c0a (patch) | |
tree | 943b0bed11f4c65ac4addd63c2f6007d918013e3 /Lib/linecache.py | |
parent | d70ee13e575ae4832f2824add64dba77ce5ab7ad (diff) | |
download | cpython-dd4383f3c12fc938a445d974543f897c3fc07c0a.zip cpython-dd4383f3c12fc938a445d974543f897c3fc07c0a.tar.gz cpython-dd4383f3c12fc938a445d974543f897c3fc07c0a.tar.bz2 |
linecache: Fix docstring location (#117948)
gh-117501 put some code before the docstring, so now it is no longer
recognized as a docstring.
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r-- | Lib/linecache.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py index d1113b1..3462f1c 100644 --- a/Lib/linecache.py +++ b/Lib/linecache.py @@ -78,16 +78,15 @@ def checkcache(filename=None): def updatecache(filename, module_globals=None): - # These imports are not at top level because linecache is in the critical - # path of the interpreter startup and importing os and sys take a lot of time - # and slow down the startup sequence. - import os - import sys - """Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list.""" + # These imports are not at top level because linecache is in the critical + # path of the interpreter startup and importing os and sys take a lot of time + # and slows down the startup sequence. + import os + import sys import tokenize if filename in cache: |