Skip to content

Commit d487f1b

Browse files
committed
Docs: Update outdated linecache.getline() example
Since gh-157146, line 8 of Lib/linecache.py is no longer 'import sys', so the example output was wrong. Use line 1 (the module docstring), which is much less likely to change.
1 parent 79e357a commit d487f1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Doc/library/linecache.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ The :mod:`!linecache` module defines the following functions:
6969
Example::
7070

7171
>>> import linecache
72-
>>> linecache.getline(linecache.__file__, 8)
73-
'import sys\n'
72+
>>> linecache.getline(linecache.__file__, 1)
73+
'"""Cache lines from Python source files.\n'

0 commit comments

Comments
 (0)