diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-18 14:16:50 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-18 14:16:50 +0100 |
commit | e595f7918e27b1563226b9480338b8bb94d7348b (patch) | |
tree | e9ebd863520869f2ec28c790673e48c15b8cb00e /Doc/library/linecache.rst | |
parent | f6446b0a0609312d8def841c710bfb0c03daf113 (diff) | |
download | cpython-e595f7918e27b1563226b9480338b8bb94d7348b.tar.gz |
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/library/linecache.rst')
-rw-r--r-- | Doc/library/linecache.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index 0c096ada91..e9ec801763 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' |