From 64a855eeab815391f968732153f6d32903ada913 Mon Sep 17 00:00:00 2001 From: Weilin Du <108666168+LamentXU123@users.noreply.github.com> Date: Wed, 2 Jul 2025 18:20:13 +0800 Subject: [PATCH] Update linecache.rst --- Doc/library/linecache.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst index e766a9280946d3..8a63d4dbba7582 100644 --- a/Doc/library/linecache.rst +++ b/Doc/library/linecache.rst @@ -13,7 +13,7 @@ The :mod:`linecache` module allows one to get any line from a Python source file, while attempting to optimize internally, using a cache, the common case where many lines are read from a single file. This is used by the :mod:`traceback` module -to retrieve source lines for inclusion in the formatted traceback. +to retrieve source lines for inclusion in the formatted traceback. The :func:`tokenize.open` function is used to open files. This function uses :func:`tokenize.detect_encoding` to get the encoding of the @@ -55,7 +55,7 @@ The :mod:`linecache` module defines the following functions: .. function:: checkcache(filename=None) - Check the cache for validity. Use this function if files in the cache may have + 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.