Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca8c60b

Browse files
mattwang44ken71301
andcommitted
Apply suggestions from code review
Co-authored-by: Payon <ken71301@hotmail.com>
1 parentc80de0e commitca8c60b

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

‎library/ast.po

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ msgid ""
3232
"with each Python release; this module helps to find out programmatically "
3333
"what the current grammar looks like."
3434
msgstr""
35-
":mod:`ast` 模組可以幫助 Python 應用程式處理 Python抽象語法樹狀資料結構。抽象"
36-
"語法本身可能會隨著每個Python版本發布而改變;此模組有助於以程式化的方式來得"
37-
"知當前語法的面貌。"
35+
":mod:`ast` 模組可以幫助 Python 應用程式處理 Python抽象語法文法 (abstract"
36+
"syntax grammar) 樹狀資料結構。抽象語法本身可能會隨著每個Python版本發布而改"
37+
"變;此模組有助於以程式化的方式來得知當前文法的面貌。"
3838

3939
#:../../library/ast.rst:23
4040
msgid""
@@ -83,8 +83,8 @@ msgid ""
8383
"rules with alternatives (aka\"sums\"), the left-hand side class is "
8484
"abstract: only instances of specific constructor nodes are ever created."
8585
msgstr""
86-
"抽象文法中為每個左側符號定義了一個類別(例如:class:`ast.stmt` 或 :class:"
87-
"`ast.expr`\\ )。另外,也為每個右側的建構函式 (constructor) 定義了一個類別;"
86+
"抽象文法中為每個左側符號定義了一個類別(例如:class:`ast.stmt` 或 :class:"
87+
"`ast.expr`\\ )。此外,也為每個右側的建構函式 (constructor) 定義了一個類別;"
8888
"這些類別繼承自左側樹的類別。例如,:class:`ast.BinOp` 繼承自 :class:`ast."
8989
"expr`。對於具有替代方案(即為「和 (sums)」)的生產規則,左側類別是抽象的:僅"
9090
"有特定建構函式節點的實例會被建立。"
@@ -141,7 +141,7 @@ msgid ""
141141
"one can get the source segment of a one-line expression node using "
142142
"``source_line[node.col_offset : node.end_col_offset]``."
143143
msgstr""
144-
"請注意,編譯器不需要知道結束位置,因此為可選的。結束偏移量在最後一個符號\\ *"
144+
"請注意,編譯器並不需要結束位置,因此其為可選的。結束偏移量在最後一個符號\\ *"
145145
"之後*,例如可以使用 ``source_line[node.col_offset : node.end_col_offset]`` 來"
146146
"獲取單列運算式節點 (expression node) 的原始片段。"
147147

@@ -229,7 +229,7 @@ msgstr ""
229229

230230
#:../../library/ast.rst:160
231231
msgid"*body* is a :class:`list` of the module's :ref:`ast-statements`."
232-
msgstr"*body* 是模組的\\ :ref:`ast-statements` :class:`list`。"
232+
msgstr"*body* 是模組的\\ :ref:`ast-statements`的一個:class:`list`。"
233233

234234
#:../../library/ast.rst:162
235235
msgid""
@@ -244,22 +244,23 @@ msgid ""
244244
"A single Python :ref:`expression input <expression-input>`. Node type "
245245
"generated by :func:`ast.parse` when *mode* is ``\"eval\"``."
246246
msgstr""
247-
"單個 Python :ref:`運算式輸入 <expression-input>`,為當 *mode* 是 "
248-
"``\"eval\"`` 時,:func:`ast.parse`生成的節點型別。"
247+
"單個 Python :ref:`運算式輸入 <expression-input>`。當 *mode* 是 ``\"eval\"`` "
248+
"時節點型別由:func:`ast.parse`生成。"
249249

250250
#:../../library/ast.rst:182
251251
msgid""
252252
"*body* is a single node, one of the :ref:`expression types <ast-"
253253
"expressions>`."
254-
msgstr"*body* 是單個節點,是\\ :ref:`運算式型別 <ast-expressions>`\\ 之一。"
254+
msgstr""
255+
"*body* 是單個節點,是\\ :ref:`運算式型別 <ast-expressions>`\\ 的其中之一。"
255256

256257
#:../../library/ast.rst:194
257258
msgid""
258259
"A single :ref:`interactive input <interactive>`, like in :ref:`tut-interac`. "
259260
"Node type generated by :func:`ast.parse` when *mode* is ``\"single\"``."
260261
msgstr""
261262
"單個\\ :ref:`互動式輸入 <interactive>`,和\\ :ref:`tut-interac`\\ 中所述的相"
262-
"似。為當 *mode* 是 ``\"single\"`` :func:`ast.parse`生成的節點型別。"
263+
"似。 *mode* 是 ``\"single\"``時節點型別由 :func:`ast.parse`生成。"
263264

264265
#:../../library/ast.rst:197
265266
msgid"*body* is a :class:`list` of :ref:`statement nodes <ast-statements>`."
@@ -274,7 +275,7 @@ msgid ""
274275
"generated by :func:`ast.parse` when *mode* is ``\"func_type\"``."
275276
msgstr""
276277
"函式的舊式型別註解的表示法,因為 3.5 之前的 Python 版本不支援 :pep:`484` 註"
277-
"釋。當 *mode* ``\"func_type\"`` :func:`ast.parse`產生的節點型別。"
278+
"釋。當 *mode* ``\"func_type\"``時節點型別由 :func:`ast.parse`生成。"
278279

279280
#:../../library/ast.rst:220
280281
msgid"Such type comments would look like this::"
@@ -348,8 +349,8 @@ msgid ""
348349
"the value, or ``None`` if no format was specified. Both ``conversion`` and "
349350
"``format_spec`` can be set at the same time."
350351
msgstr""
351-
"``format_spec`` 是一個 :class:`JoinedStr` 節點,表示值的格式,``None`` 則代表"
352-
"未指定格式。``conversion`` 和 ``format_spec`` 可以同時設定。"
352+
"``format_spec`` 是一個 :class:`JoinedStr` 節點,表示值的格式,若未指定格式則"
353+
"為 ``None``。``conversion`` 和 ``format_spec`` 可以同時設定。"
353354

354355
#:../../library/ast.rst:284
355356
msgid""
@@ -533,7 +534,7 @@ msgid ""
533534
"An expression such as ``a if b else c``. Each field holds a single node, so "
534535
"in the following example, all three are :class:`Name` nodes."
535536
msgstr""
536-
"像是 ``a if b else c`` 之類的運算式。每個欄位都包含一個節點,因此在以下範例"
537+
"像是 ``a if b else c`` 之類的運算式。每個欄位都保存一個節點,因此在以下範例"
537538
"中,所有三個都是 :class:`Name` 節點。"
538539

539540
#:../../library/ast.rst:636
@@ -580,8 +581,8 @@ msgid ""
580581
"occur only inside the *slice* field of :class:`Subscript`, either directly "
581582
"or as an element of :class:`Tuple`."
582583
msgstr""
583-
"常規切片(形式為 ``lower:upper`` 或 ``lower:upper:step``\\ )。只能直接出現"
584-
" :class:`Subscript` 的 *slice* 欄位內,或者作為 :class:`Tuple` 的元素出現。"
584+
"常規切片(形式為 ``lower:upper`` 或 ``lower:upper:step``\\ )。只能直接或者或"
585+
"者作為 :class:`Tuple` 的元素出現在 :class:`Subscript` 的 *slice* 欄位內。"
585586

586587
#:../../library/ast.rst:714
587588
msgid"Comprehensions"
@@ -685,7 +686,7 @@ msgid ""
685686
"``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``."
686687
msgstr""
687688
"一個 ``raise`` 陳述式。``exc`` 是要引發的例外物件,通常是 :class:`Call` 或 :"
688-
"class:`Name`,或者獨立 ``raise``的則為 ``None``。``cause`` 是 ``raise x "
689+
"class:`Name`,若是獨立的 ``raise``則為 ``None``。``cause`` 是 ``raise x "
689690
"from y`` 中的可選部分 ``y``。"
690691

691692
#:../../library/ast.rst:977
@@ -741,7 +742,7 @@ msgid ""
741742
"import (0 means absolute import)."
742743
msgstr""
743744
"代表 ``from x import y``。``module`` 是 'from' 名稱的原始字串,前面沒有任何的"
744-
"點 (dot),或者對於諸如 ``from . import foo``之類的陳述式為 ``None``。"
745+
"點 (dot),或者對於諸如 ``from . import foo``之類的陳述式則為 ``None``。"
745746
"``level`` 是一個整數,保存相對引入的級別(0 表示絕對引入)。"
746747

747748
#:../../library/ast.rst:1089
@@ -865,7 +866,7 @@ msgid ""
865866
"iterable of :class:`match_case` nodes with the different cases."
866867
msgstr""
867868
"一個 ``match`` 陳述式。``subject`` 保存匹配的主題(與案例匹配的物件),"
868-
"``cases``包含具有不同案例的可疊代 :class:`match_case`節點。"
869+
"``cases``包含具有不同案例的 :class:`match_case`節點的可疊代物件。"
869870

870871
#:../../library/ast.rst:1417
871872
msgid""
@@ -967,7 +968,7 @@ msgid ""
967968
"pattern)."
968969
msgstr""
969970
"匹配類別模式。``cls`` 是一個給定要匹配的名義類別 (nominal class) 的運算式。"
970-
"``patterns``是要與類定義的模式匹配屬性序列進行匹配的模式節點序列。"
971+
"``patterns``是要與類別定義的模式匹配屬性序列進行匹配的模式節點序列。"
971972
"``kwd_attrs`` 是要匹配的附加屬性序列(在類別模式中指定為關鍵字引數),"
972973
"``kwd_patterns`` 是相應的模式(在類別模式中指定為關鍵字的值)。"
973974

@@ -1101,7 +1102,7 @@ msgid ""
11011102
"expression. Unlike :class:`FunctionDef`, ``body`` holds a single node."
11021103
msgstr""
11031104
"``lambda`` 是可以在運算式內使用的最小函式定義。與 :class:`FunctionDef` 不同,"
1104-
"``body``持有單個節點。"
1105+
"``body``保存單個節點。"
11051106

11061107
#:../../library/ast.rst:1923
11071108
msgid"The arguments for a function."
@@ -1188,7 +1189,7 @@ msgid ""
11881189
"'metaclass'. Other keywords will be passed to the metaclass, as per "
11891190
"`PEP-3115 <https://peps.python.org/pep-3115/>`_."
11901191
msgstr""
1191-
"``keywords`` 是一個 :class:`keyword` 節點的串列,主要用於 'metaclass'(元類"
1192+
"``keywords`` 是一個 :class:`.keyword` 節點的串列,主要用於 'metaclass'(元類"
11921193
"別)。如 `PEP-3115 <https://peps.python.org/pep-3115/>`_ 所述,其他關鍵字將被"
11931194
"傳遞到 metaclass。"
11941195

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp