44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Freesand Leo <[email protected] >, 2018 7+ # Freesand Leo <[email protected] >, 2019 88#
99#, fuzzy
1010msgid ""
@@ -13,7 +13,7 @@ msgstr ""
1313"Report-Msgid-Bugs-To : \n "
1414"POT-Creation-Date : 2019-09-01 14:24+0000\n "
1515"PO-Revision-Date : 2017-02-16 23:16+0000\n "
16- "
Last-Translator :
Freesand Leo <[email protected] >, 2018 \n "
16+ "
Last-Translator :
Freesand Leo <[email protected] >, 2019 \n "
1717"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1818"MIME-Version : 1.0\n "
1919"Content-Type : text/plain; charset=UTF-8\n "
@@ -23,11 +23,11 @@ msgstr ""
2323
2424#: ../../library/linecache.rst:2
2525msgid ":mod:`linecache` --- Random access to text lines"
26- msgstr ""
26+ msgstr ":mod:`linecache` --- 随机读写文本行 "
2727
2828#: ../../library/linecache.rst:9
2929msgid "**Source code:** :source:`Lib/linecache.py`"
30- msgstr ""
30+ msgstr "**源代码:** :source:`Lib/linecache.py` "
3131
3232#: ../../library/linecache.rst:13
3333msgid ""
@@ -37,24 +37,30 @@ msgid ""
3737":mod:`traceback` module to retrieve source lines for inclusion in the "
3838"formatted traceback."
3939msgstr ""
40+ ":mod:`linecache` 模块允许从一个 Python 源文件中获取任意的行,并会尝试使用缓存进行内部优化,常应用于从单个文件读取多行的场合。 "
41+ "此模块被 :mod:`traceback` 模块用来提取源码行以便包含在格式化的回溯中。"
4042
4143#: ../../library/linecache.rst:18
4244msgid ""
4345"The :func:`tokenize.open` function is used to open files. This function uses"
4446" :func:`tokenize.detect_encoding` to get the encoding of the file; in the "
4547"absence of an encoding token, the file encoding defaults to UTF-8."
4648msgstr ""
49+ ":func:`tokenize.open` 函数被用于打开文件。 此函数使用 :func:`tokenize.detect_encoding` "
50+ "来获取文件的编码格式;如果未指明编码格式,则默认编码为 UTF-8。"
4751
4852#: ../../library/linecache.rst:22
4953msgid "The :mod:`linecache` module defines the following functions:"
50- msgstr ""
54+ msgstr ":mod:`linecache` 模块定义了下列函数: "
5155
5256#: ../../library/linecache.rst:27
5357msgid ""
5458"Get line *lineno* from file named *filename*. This function will never raise"
5559" an exception --- it will return ``''`` on errors (the terminating newline "
5660"character will be included for lines that are found)."
5761msgstr ""
62+ "从名为 *filename* 的文件中获取 *lineno* 行,此函数绝不会引发异常 --- 出现错误时它将返回 ``''`` "
63+ "(所有找到的行都将包含换行符作为结束)。"
5864
5965#: ../../library/linecache.rst:33
6066msgid ""
@@ -70,14 +76,15 @@ msgstr ""
7076msgid ""
7177"Clear the cache. Use this function if you no longer need lines from files "
7278"previously read using :func:`getline`."
73- msgstr ""
79+ msgstr "清空缓存。 如果你不再需要之前使用 :func:`getline` 从文件读取的行即可使用此函数。 "
7480
7581#: ../../library/linecache.rst:50
7682msgid ""
7783"Check the cache for validity. Use this function if files in the cache may "
7884"have changed on disk, and you require the updated version. If *filename* is"
7985" omitted, it will check all the entries in the cache."
8086msgstr ""
87+ "检查缓存有效性。 如果缓存中的文件在磁盘上发生了改变,而你需要更新后的版本即可使用此函数。 如果省略了 *filename*,它会检查缓存中的所有条目。"
8188
8289#: ../../library/linecache.rst:56
8390msgid ""
@@ -86,6 +93,8 @@ msgid ""
8693"later call. This avoids doing I/O until a line is actually needed, without "
8794"having to carry the module globals around indefinitely."
8895msgstr ""
96+ "捕获有关某个非基于文件的模块的足够细节信息,以允许稍后再通过 :func:`getline` 来获取其中的行,即使当稍后调用时 "
97+ "*module_globals* 为 ``None``。 这可以避免在实际需要读取行之前执行 I/O,也不必始终保持模块全局变量。"
8998
9099#: ../../library/linecache.rst:63
91100msgid "Example::"
0 commit comments