11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2022 , Python Software Foundation
2+ # Copyright (C) 2001-2021 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
4+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
45#
56# Translators:
7+ # Freesand Leo <yuqinju@163.com>, 2021
8+ # jaystone776 <1732865113@qq.com>, 2021
9+ #
610msgid ""
711msgstr ""
812"Project-Id-Version :Python 3.11\n "
913"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 "
14+ "POT-Creation-Date :2021 -06-29 12:56+0000 \n "
15+ "PO-Revision-Date :2022 -12-01 01:35+0800 \n "
1216"Last-Translator :Liang-Bo Wang <me@liang2.tw>\n "
1317"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1418"tw)\n "
@@ -17,10 +21,11 @@ msgstr ""
1721"Content-Type :text/plain; charset=UTF-8\n "
1822"Content-Transfer-Encoding :8bit\n "
1923"Plural-Forms :nplurals=1; plural=0;\n "
24+ "X-Generator :Poedit 3.2\n "
2025
2126#: ../../reference/toplevel_components.rst:6
2227msgid "Top-level components"
23- msgstr ""
28+ msgstr "最高層級元件 "
2429
2530#: ../../reference/toplevel_components.rst:10
2631msgid ""
@@ -29,10 +34,12 @@ msgid ""
2934"interactively, from a module source file, etc. This chapter gives the "
3035"syntax used in these cases."
3136msgstr ""
37+ "Python 直譯器可以從多種來源獲得輸入:作為標準輸入或程式引數自腳本傳入、以互動"
38+ "式鍵入、自模組原始檔引入等等。這一章將給出在這些情況下所用的語法。"
3239
3340#: ../../reference/toplevel_components.rst:19
3441msgid "Complete Python programs"
35- msgstr ""
42+ msgstr "完整的 Python 程式 "
3643
3744#: ../../reference/toplevel_components.rst:28
3845msgid ""
@@ -45,12 +52,18 @@ msgid ""
4552"`__main__`. The latter is used to provide the local and global namespace "
4653"for execution of the complete program."
4754msgstr ""
55+ "雖然語言規範描述不必規定語言直譯器是如何被調用(invoke)的,但對完整的 "
56+ "Python 程式加以說明還是很有用的。一個完整的 Python 程式會在最小初始化環境中被"
57+ "執行:所有內建和標準模組均為可用,但均處於未初始化狀態,只有 :mod:`sys`\\ "
58+ "(各種系統服務)、:mod:`builtins`\\ (內建函式、例外和 ``None``)和 :mod:"
59+ "`__main__` 除外。後者用於為完整程式的執行提供區域性和全域性命名空間 "
60+ "(namespace)。"
4861
4962#: ../../reference/toplevel_components.rst:36
5063msgid ""
5164"The syntax for a complete Python program is that for file input, described "
5265"in the next section."
53- msgstr ""
66+ msgstr "用於一個完整 Python 程式的語法,即下節所描述的檔案輸入。 "
5467
5568#: ../../reference/toplevel_components.rst:43
5669msgid ""
@@ -60,6 +73,9 @@ msgid ""
6073"identical to that of a complete program; each statement is executed in the "
6174"namespace of :mod:`__main__`."
6275msgstr ""
76+ "直譯器也可以透過互動模式被調用;在此情況下,它並不讀取和執行一個完整程式,而"
77+ "是每讀取一條陳述式就執行一次(可能為複合陳述式)。此時的初始環境與一個完整程"
78+ "式的相同;每條陳述式會在 :mod:`__main__` 的命名空間中被執行。"
6379
6480#: ../../reference/toplevel_components.rst:55
6581msgid ""
@@ -69,52 +85,59 @@ msgid ""
6985"is a tty device, the interpreter enters interactive mode; otherwise, it "
7086"executes the file as a complete program."
7187msgstr ""
88+ "一個完整程式可透過三種形式被傳遞給直譯器:使用 :option:`-c` *字串*\\ 命令列選"
89+ "項、使用一個檔案作為第一個命令列引數、或者使用標準輸入。如果檔案或標準輸入是"
90+ "一個 tty 裝置,直譯器會進入互動模式;否則它會將檔案當作一個完整程式來執行。"
7291
7392#: ../../reference/toplevel_components.rst:65
7493msgid "File input"
75- msgstr ""
94+ msgstr "檔案輸入 "
7695
7796#: ../../reference/toplevel_components.rst:67
7897msgid "All input read from non-interactive files has the same form:"
79- msgstr ""
98+ msgstr "所有從非互動式檔案讀取的輸入都具有相同的形式: "
8099
81100#: ../../reference/toplevel_components.rst:72
82101msgid "This syntax is used in the following situations:"
83- msgstr ""
102+ msgstr "此語法用於下列幾種情況: "
84103
85104#: ../../reference/toplevel_components.rst:74
86105msgid "when parsing a complete Python program (from a file or from a string);"
87- msgstr ""
106+ msgstr "剖析一個完整 Python 程式時(從檔案或字串); "
88107
89108#: ../../reference/toplevel_components.rst:76
90109msgid "when parsing a module;"
91- msgstr ""
110+ msgstr "剖析一個模組時; "
92111
93112#: ../../reference/toplevel_components.rst:78
94113msgid "when parsing a string passed to the :func:`exec` function;"
95- msgstr ""
114+ msgstr "剖析一個傳遞给 :func:`exec` 函数的字串時; "
96115
97116#: ../../reference/toplevel_components.rst:84
98117msgid "Interactive input"
99- msgstr ""
118+ msgstr "互動式輸入 "
100119
101120#: ../../reference/toplevel_components.rst:86
102121msgid "Input in interactive mode is parsed using the following grammar:"
103- msgstr ""
122+ msgstr "互動模式下的輸入使用以下語法進行剖析: "
104123
105124#: ../../reference/toplevel_components.rst:91
106125msgid ""
107126"Note that a (top-level) compound statement must be followed by a blank line "
108127"in interactive mode; this is needed to help the parser detect the end of the "
109128"input."
110129msgstr ""
130+ "注意在互動模式下,一條(最高層級)複合陳述式最後必須帶有一個空行;這能夠幫助"
131+ "剖析器確定輸入已經結束。"
111132
112133#: ../../reference/toplevel_components.rst:98
113134msgid "Expression input"
114- msgstr ""
135+ msgstr "運算式輸入 "
115136
116137#: ../../reference/toplevel_components.rst:103
117138msgid ""
118139":func:`eval` is used for expression input. It ignores leading whitespace. "
119140"The string argument to :func:`eval` must have the following form:"
120141msgstr ""
142+ ":func:`eval` 被用於運算式輸入,它會忽略開頭的空白。傳遞給 :func:`eval` 的字串"
143+ "引數必須具有以下形式:"