diff options
Diffstat (limited to 'Doc/library/linecache.rst')
-rw-r--r-- | Doc/library/linecache.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index 1aef2f3..146cb27 100644 --- a/Doc/library/linecache.rst +++ b/Doc/library/linecache.rst @@ -1,4 +1,3 @@ - :mod:`linecache` --- Random access to text lines ================================================ @@ -15,7 +14,7 @@ to retrieve source lines for inclusion in the formatted traceback. The :mod:`linecache` module defines the following functions: -.. function:: getline(filename, lineno[, module_globals]) +.. function:: getline(filename, lineno, module_globals=None) Get line *lineno* from file named *filename*. This function will never throw an exception --- it will return ``''`` on errors (the terminating newline character @@ -35,12 +34,13 @@ The :mod:`linecache` module defines the following functions: previously read using :func:`getline`. -.. function:: checkcache([filename]) +.. function:: checkcache(filename=None) Check the cache for validity. Use this function if files in the cache may have changed on disk, and you require the updated version. If *filename* is omitted, it will check all the entries in the cache. + Example:: >>> import linecache |