3
3
# This file is distributed under the same license as the Python package.
4
4
#
5
5
# Translators:
6
+ # Weilin Du, 2025
6
7
msgid ""
7
8
msgstr ""
8
9
"Project-Id-Version : Python 3.13\n "
9
10
"Report-Msgid-Bugs-To : \n "
10
11
"POT-Creation-Date : 2024-09-01 22:24+0800\n "
11
- "PO-Revision-Date : 2018-05-23 16:05+0000 \n "
12
- "Last-Translator : Adrian Liaw <adrianliaw2000@gmail .com>\n "
12
+ "PO-Revision-Date : 2025-07-07 23:50+0800 \n "
13
+ "Last-Translator : Weilin Du <1372449351@qq .com>\n "
13
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
15
"tw)\n "
15
16
"Language : zh_TW\n "
16
17
"MIME-Version : 1.0\n "
17
18
"Content-Type : text/plain; charset=UTF-8\n "
18
19
"Content-Transfer-Encoding : 8bit\n "
19
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
+ "X-Generator : Poedit 3.6\n "
20
22
21
23
#: ../../library/linecache.rst:2
22
24
msgid ":mod:`!linecache` --- Random access to text lines"
@@ -30,51 +32,69 @@ msgstr "**原始碼:**\\ :source:`Lib/linecache.py`"
30
32
msgid ""
31
33
"The :mod:`linecache` module allows one to get any line from a Python source "
32
34
"file, while attempting to optimize internally, using a cache, the common "
33
- "case where many lines are read from a single file. This is used by the :mod: "
34
- "`traceback` module to retrieve source lines for inclusion in the formatted "
35
- "traceback."
35
+ "case where many lines are read from a single file. This is used by "
36
+ "the :mod: `traceback` module to retrieve source lines for inclusion in the "
37
+ "formatted traceback."
36
38
msgstr ""
39
+ ":mod:`linecache` 模組允許從 Python 原始碼檔案中取得任何一行。當嘗試在程式內部"
40
+ "進行最佳化,會使用快取,這是從單一檔案讀取許多行的常見情況。 這"
41
+ "被 :mod:`traceback` 模組用來擷取來自原始碼檔案的行,以包含在格式化的 "
42
+ "traceback 中。"
37
43
38
44
#: ../../library/linecache.rst:18
39
45
msgid ""
40
46
"The :func:`tokenize.open` function is used to open files. This function "
41
47
"uses :func:`tokenize.detect_encoding` to get the encoding of the file; in "
42
48
"the absence of an encoding token, the file encoding defaults to UTF-8."
43
49
msgstr ""
50
+ ":func:`tokenize.open` 函式用來開啟檔案。這個函式使"
51
+ "用 :func:`tokenize.detect_encoding` 來取得檔案的編碼;在沒有編碼標記的情況"
52
+ "下,檔案編碼預設為 UTF-8。"
44
53
45
54
#: ../../library/linecache.rst:22
46
55
msgid "The :mod:`linecache` module defines the following functions:"
47
- msgstr ""
56
+ msgstr ":mod:`linecache` 模組定義了下列函式: "
48
57
49
58
#: ../../library/linecache.rst:27
50
59
msgid ""
51
60
"Get line *lineno* from file named *filename*. This function will never raise "
52
61
"an exception --- it will return ``''`` on errors (the terminating newline "
53
62
"character will be included for lines that are found)."
54
63
msgstr ""
64
+ "從名為 *filename* 的檔案中取得 *lineno* 行。這個函式不會產生例外 --- 它會在出"
65
+ "錯時回傳 ``''`` (找到的行會包含終止換行字元)。"
55
66
56
67
#: ../../library/linecache.rst:33
57
68
msgid ""
58
- "If a file named *filename* is not found, the function first checks for a : "
59
- "pep:`302` ``__loader__`` in *module_globals*. If there is such a loader and "
60
- "it defines a ``get_source`` method, then that determines the source lines "
61
- "(if ``get_source()`` returns ``None``, then ``''`` is returned). Finally, if "
62
- "*filename* is a relative filename, it is looked up relative to the entries "
63
- "in the module search path, ``sys.path``."
69
+ "If a file named *filename* is not found, the function first checks for "
70
+ "a : pep:`302` ``__loader__`` in *module_globals*. If there is such a loader "
71
+ "and it defines a ``get_source`` method, then that determines the source "
72
+ "lines (if ``get_source()`` returns ``None``, then ``''`` is returned). "
73
+ "Finally, if *filename* is a relative filename, it is looked up relative to "
74
+ "the entries in the module search path, ``sys.path``."
64
75
msgstr ""
76
+ "如果找不到名為 *filename* 的檔案,函式會先檢查 *module_globals* 中是否"
77
+ "有 :pep:`302` `__loader__` 載入器。如果有這樣一個載入器,而且它定義了一個 "
78
+ "``get_source`` 方法,這之後它就會決定原始碼行(如果 ``get_source()`` 回傳 "
79
+ "``None``,那麼就會回傳 ``''``)。最後,如果 *filename* 是相對的檔案名稱,則會"
80
+ "相對於模組搜尋路徑 ``sys.path`` 中的項目進行搜尋。"
65
81
66
82
#: ../../library/linecache.rst:44
67
83
msgid ""
68
84
"Clear the cache. Use this function if you no longer need lines from files "
69
85
"previously read using :func:`getline`."
70
86
msgstr ""
87
+ "清除快取。如果你不再需要先前使用 :func:`getline` 讀取的檔案行數,請使用此函"
88
+ "式。"
71
89
72
90
#: ../../library/linecache.rst:50
73
91
msgid ""
74
92
"Check the cache for validity. Use this function if files in the cache may "
75
93
"have changed on disk, and you require the updated version. If *filename* is "
76
94
"omitted, it will check all the entries in the cache."
77
95
msgstr ""
96
+ "檢查快取是否有效。如果快取中的檔案可能已在磁碟上變更,而你需要更新的版本,請"
97
+ "使用此功能。 如果省略 *filename*,則會檢查快取中的所有項目。"
78
98
79
99
#: ../../library/linecache.rst:56
80
100
msgid ""
@@ -83,6 +103,9 @@ msgid ""
83
103
"later call. This avoids doing I/O until a line is actually needed, without "
84
104
"having to carry the module globals around indefinitely."
85
105
msgstr ""
106
+ "即使 *module_globals* 在稍後的呼叫中是 ``None`` ,也可以擷取非檔案型模組的足"
107
+ "夠細節,以允許稍後透過 :func:`getline` 取得其行。這可以避免在真正需要某一行之"
108
+ "前進行 I/O 操作,而不必無限期地帶著模組的全域變數。"
86
109
87
110
#: ../../library/linecache.rst:63
88
111
msgid "Example::"
0 commit comments