[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4 (linecache doc)
victor.stinner
python-checkins at python.org
Wed Mar 18 14:19:52 CET 2015
https://hg.python.org/cpython/rev/304f8011df9f
changeset: 95041:304f8011df9f
parent: 95039:4f3abc65a8b4
parent: 95040:01cb2107cbc3
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Mar 18 14:19:19 2015 +0100
summary:
Merge 3.4 (linecache doc)
files:
Doc/library/linecache.rst | 4 ++--
Lib/linecache.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst
--- a/Doc/library/linecache.rst
+++ b/Doc/library/linecache.rst
@@ -59,5 +59,5 @@
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'
diff --git a/Lib/linecache.py b/Lib/linecache.py
--- 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
@@ -35,7 +35,7 @@
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:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list