summaryrefslogtreecommitdiffstats
path: root/Doc
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 /Doc
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 'Doc')
-rw-r--r--Doc/library/linecache.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst
index 0c096ad..e9ec801 100644
--- a/Doc/library/linecache.rst
+++ b/Doc/library/linecache.rst
@@ -51,5 +51,5 @@ The :mod:`linecache` module defines the following functions:
Example::
>>> import linecache
- >>> linecache.getline('/etc/passwd', 4)
- 'sys:x:3:3:sys:/dev:/bin/sh\n'
+ >>> linecache.getline(linecache.__file__, 8)
+ 'import sys\n'