1- # SOME DESCRIPTIVE TITLE.
21# Copyright (C) 2001-2022, Python Software Foundation
32# This file is distributed under the same license as the Python package.
43#
54# Translators:
5+ # Liang-Bo Wang <me@liang2.tw>, 2015
6+ # Matt Wang <mattwang44@gmail.com>, 2022
7+ #
68msgid ""
79msgstr ""
810"Project-Id-Version : Python 3.11\n "
911"Report-Msgid-Bugs-To : \n "
10- "POT-Creation-Date : 2018 -06-26 18:54+0800 \n "
11- "PO-Revision-Date : 2015 -12-09 17:51+0000 \n "
12- "Last-Translator : Liang-Bo Wang <me@liang2.tw >\n "
12+ "POT-Creation-Date : 2021 -06-29 12:56+0000 \n "
13+ "PO-Revision-Date : 2022 -12-01 01:37+0800 \n "
14+ "Last-Translator : Matt Wang <mattwang44@gmail.com >\n "
1315"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1416"tw)\n "
1517"Language : zh_TW\n "
1618"MIME-Version : 1.0\n "
1719"Content-Type : text/plain; charset=UTF-8\n "
1820"Content-Transfer-Encoding : 8bit\n "
1921"Plural-Forms : nplurals=1; plural=0;\n "
22+ "X-Generator : Poedit 3.2\n "
2023
2124#: ../../reference/toplevel_components.rst:6
2225msgid "Top-level components"
23- msgstr ""
26+ msgstr "最高層級元件 "
2427
2528#: ../../reference/toplevel_components.rst:10
2629msgid ""
@@ -29,10 +32,12 @@ msgid ""
2932"interactively, from a module source file, etc. This chapter gives the "
3033"syntax used in these cases."
3134msgstr ""
35+ "Python 直譯器可以從多種來源獲得輸入:作為標準輸入或程式引數自腳本傳入、以互動"
36+ "式鍵入、自模組原始檔引入等等。這一章將給出在這些情況下所用的語法。"
3237
3338#: ../../reference/toplevel_components.rst:19
3439msgid "Complete Python programs"
35- msgstr ""
40+ msgstr "完整的 Python 程式 "
3641
3742#: ../../reference/toplevel_components.rst:28
3843msgid ""
@@ -45,12 +50,18 @@ msgid ""
4550"`__main__`. The latter is used to provide the local and global namespace "
4651"for execution of the complete program."
4752msgstr ""
53+ "雖然語言規範描述不必規定語言直譯器是如何被調用(invoke)的,但對完整的 "
54+ "Python 程式加以說明還是很有用的。一個完整的 Python 程式會在最小初始化環境中被"
55+ "執行:所有內建和標準模組均為可用,但均處於未初始化狀態,只有 :mod:`sys`\\ "
56+ "(各種系統服務)、:mod:`builtins`\\ (內建函式、例外和 ``None``)和 :mod:"
57+ "`__main__` 除外。後者用於為完整程式的執行提供區域性和全域性命名空間 "
58+ "(namespace)。"
4859
4960#: ../../reference/toplevel_components.rst:36
5061msgid ""
5162"The syntax for a complete Python program is that for file input, described "
5263"in the next section."
53- msgstr ""
64+ msgstr "用於一個完整 Python 程式的語法,即下節所描述的檔案輸入。 "
5465
5566#: ../../reference/toplevel_components.rst:43
5667msgid ""
@@ -60,6 +71,9 @@ msgid ""
6071"identical to that of a complete program; each statement is executed in the "
6172"namespace of :mod:`__main__`."
6273msgstr ""
74+ "直譯器也可以透過互動模式被調用;在此情況下,它並不讀取和執行一個完整程式,而"
75+ "是每讀取一條陳述式就執行一次(可能為複合陳述式)。此時的初始環境與一個完整程"
76+ "式的相同;每條陳述式會在 :mod:`__main__` 的命名空間中被執行。"
6377
6478#: ../../reference/toplevel_components.rst:55
6579msgid ""
@@ -69,52 +83,59 @@ msgid ""
6983"is a tty device, the interpreter enters interactive mode; otherwise, it "
7084"executes the file as a complete program."
7185msgstr ""
86+ "一個完整程式可透過三種形式被傳遞給直譯器:使用 :option:`-c` *字串*\\ 命令列選"
87+ "項、使用一個檔案作為第一個命令列引數、或者使用標準輸入。如果檔案或標準輸入是"
88+ "一個 tty 裝置,直譯器會進入互動模式;否則它會將檔案當作一個完整程式來執行。"
7289
7390#: ../../reference/toplevel_components.rst:65
7491msgid "File input"
75- msgstr ""
92+ msgstr "檔案輸入 "
7693
7794#: ../../reference/toplevel_components.rst:67
7895msgid "All input read from non-interactive files has the same form:"
79- msgstr ""
96+ msgstr "所有從非互動式檔案讀取的輸入都具有相同的形式: "
8097
8198#: ../../reference/toplevel_components.rst:72
8299msgid "This syntax is used in the following situations:"
83- msgstr ""
100+ msgstr "此語法用於下列幾種情況: "
84101
85102#: ../../reference/toplevel_components.rst:74
86103msgid "when parsing a complete Python program (from a file or from a string);"
87- msgstr ""
104+ msgstr "剖析一個完整 Python 程式時(從檔案或字串); "
88105
89106#: ../../reference/toplevel_components.rst:76
90107msgid "when parsing a module;"
91- msgstr ""
108+ msgstr "剖析一個模組時; "
92109
93110#: ../../reference/toplevel_components.rst:78
94111msgid "when parsing a string passed to the :func:`exec` function;"
95- msgstr ""
112+ msgstr "剖析一個傳遞给 :func:`exec` 函数的字串時; "
96113
97114#: ../../reference/toplevel_components.rst:84
98115msgid "Interactive input"
99- msgstr ""
116+ msgstr "互動式輸入 "
100117
101118#: ../../reference/toplevel_components.rst:86
102119msgid "Input in interactive mode is parsed using the following grammar:"
103- msgstr ""
120+ msgstr "互動模式下的輸入使用以下語法進行剖析: "
104121
105122#: ../../reference/toplevel_components.rst:91
106123msgid ""
107124"Note that a (top-level) compound statement must be followed by a blank line "
108125"in interactive mode; this is needed to help the parser detect the end of the "
109126"input."
110127msgstr ""
128+ "注意在互動模式下,一條(最高層級)複合陳述式最後必須帶有一個空行;這能夠幫助"
129+ "剖析器確定輸入已經結束。"
111130
112131#: ../../reference/toplevel_components.rst:98
113132msgid "Expression input"
114- msgstr ""
133+ msgstr "運算式輸入 "
115134
116135#: ../../reference/toplevel_components.rst:103
117136msgid ""
118137":func:`eval` is used for expression input. It ignores leading whitespace. "
119138"The string argument to :func:`eval` must have the following form:"
120139msgstr ""
140+ ":func:`eval` 被用於運算式輸入,它會忽略開頭的空白。傳遞給 :func:`eval` 的字串"
141+ "引數必須具有以下形式:"
0 commit comments