summaryrefslogtreecommitdiffstats
path: root/Lib/linecache.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-18 13:16:50 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-18 13:16:50 (GMT)
commit376658fa13f5c56a89a47ced0c5a88c43ce508b7 (patch)
treecb6cee25097e95d512e66a35ccb2ba9f082c5fc5 /Lib/linecache.py
parent93f0665fb612f08f3a4e6dc5d9d5350ddad6b653 (diff)
downloadcpython-376658fa13f5c56a89a47ced0c5a88c43ce508b7.zip
cpython-376658fa13f5c56a89a47ced0c5a88c43ce508b7.tar.gz
cpython-376658fa13f5c56a89a47ced0c5a88c43ce508b7.tar.bz2
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.
Diffstat (limited to 'Lib/linecache.py')
-rw-r--r--Lib/linecache.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/linecache.py b/Lib/linecache.py
index 02a9eb5..e505b03 100644
--- a/Lib/linecache.py
+++ b/Lib/linecache.py
@@ -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: