mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #11726: Fix linecache example in the doc
Use a Python source file (linecache.__file__) instead of /etc/passwd. Modify also linecache docstrings to clarify the linecache is written to cache Python source files, not any text files.
This commit is contained in:
parent
93f0665fb6
commit
376658fa13
2 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
"""Cache lines from files.
|
||||
"""Cache lines from Python source files.
|
||||
|
||||
This is intended to read lines from modules imported -- hence if a filename
|
||||
is not found, it will look down the module search path for a file by
|
||||
|
@ -32,7 +32,7 @@ def clearcache():
|
|||
|
||||
|
||||
def getlines(filename, module_globals=None):
|
||||
"""Get the lines for a file from the cache.
|
||||
"""Get the lines for a Python source file from the cache.
|
||||
Update the cache if it doesn't contain an entry for this file already."""
|
||||
|
||||
if filename in cache:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue