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

Commit066d693

Browse files
committed
Update
1 parentca809e3 commit066d693

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

‎library/__main__.po‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ msgid ""
9292
"program needs. Sometimes\"top-level code\" is called an *entry point* to "
9393
"the application."
9494
msgstr""
95-
"``__main__``是運行頂層程式碼的環境名稱。「頂層程式碼」是使用者指定且第一"
95+
"``__main__``是執行頂層程式碼的環境名稱。「頂層程式碼」是使用者指定且第一"
9696
"個開始運作的 Python 模組。它是「頂層」的原因是因為它引入程式所需的所有其他模"
9797
"組。有時「頂層程式碼」被稱為應用程式的\\ *入口點*。"
9898

@@ -102,7 +102,7 @@ msgstr "頂層程式碼環境可以是:"
102102

103103
#:../../library/__main__.rst:55
104104
msgid"the scope of an interactive prompt::"
105-
msgstr"互動式提示字元的範圍: ::"
105+
msgstr"互動式提示字元的作用域: ::"
106106

107107
#:../../library/__main__.rst:60
108108
msgid"the Python module passed to the Python interpreter as a file argument:"
@@ -170,7 +170,7 @@ msgid ""
170170
"top-level environment."
171171
msgstr""
172172
"這就是使用 ``if __name__ == '__main__'`` 程式碼區塊派上用場的地方。除非該模組"
173-
"在頂層環境中執行,否則此區塊中的程式碼不會運行。"
173+
"在頂層環境中執行,否則此區塊中的程式碼不會執行。"
174174

175175
#:../../library/__main__.rst:127
176176
msgid""
@@ -240,7 +240,7 @@ msgid ""
240240
"we later package it as a console script entry-point in a pip-installable "
241241
"package."
242242
msgstr""
243-
"透過我們自己主動遵循這個慣例,我們的模組在直接運行時(即 ``python echo.py``)"
243+
"透過我們自己主動遵循這個慣例,我們的模組在直接執行時(即 ``python echo.py``)"
244244
"的行為,將和我們稍後將其打包為 pip 可安裝套件中的控制台腳本入口點相同。"
245245

246246
#:../../library/__main__.rst:185
@@ -253,8 +253,8 @@ msgid ""
253253
"convention."
254254
msgstr""
255255
"特別是,要謹慎處理從 ``main`` 函式回傳字串。:func:`sys.exit` 會將字串引數直"
256-
"譯為失敗訊息,因此你的程式將有一個表示失敗的結束代碼 ``1``,表示為失敗,並且該字串將被"
257-
"寫入 :data:`sys.stderr`。前面的 ``echo.py``範例使用常規 ``sys."
256+
"譯為失敗訊息,因此你的程式將有一個表示失敗的結束代碼 ``1``,並且該字串將被"
257+
"寫入 :data:`sys.stderr`。前面的 ``echo.py``範例使用慣例的 ``sys."
258258
"exit(main())`` 進行示範。"
259259

260260
#:../../library/__main__.rst:193
@@ -296,7 +296,7 @@ msgid ""
296296
"this hypothetical case, it might make sense to allow the teacher to search "
297297
"for students::"
298298
msgstr""
299-
"該命令將導致 ``__main__.py``運行。如何利用此機制將取決於你正在編寫的套件的性"
299+
"該命令將導致 ``__main__.py``執行。如何利用此機制將取決於你正在編寫的套件的性"
300300
"質,但在這種虛構的情況下,允許教師搜尋學生可能是有意義的: ::"
301301

302302
#:../../library/__main__.rst:233
@@ -307,8 +307,8 @@ msgid ""
307307
"the :ref:`tut-modules` section of the tutorial."
308308
msgstr""
309309
"請注意,``from .student import search_students`` 是相對引入的範例。在引用套件"
310-
"內的模組時,可以使用此引入樣式。有關更多詳細資訊,請參閱教學 :ref:`tut-"
311-
"modules`中的 :ref:`intra-package-references`。"
310+
"內的模組時,可以使用此引入樣式。有關更多詳細資訊,請參閱 :ref:`tut-"
311+
"modules`教學章節中的 :ref:`intra-package-references`。"
312312

313313
#:../../library/__main__.rst:241
314314
msgid""
@@ -400,8 +400,8 @@ msgid ""
400400
"the line with ``my_name =\"Dinsdale\"`` fixes the program and now it exits "
401401
"with status code 0, indicating success:"
402402
msgstr""
403-
"程式的結束代碼將為 1,表示出現錯誤。取消註解 ``my_name =\"Dinsdale\"``執行"
404-
"修復程式後,現在它以狀態碼 0退出,表示成功:"
403+
"程式的結束代碼將為 1,表示出現錯誤。取消註解 ``my_name =\"Dinsdale\"``"
404+
"修復程式後,現在它以狀態碼 0結束,表示成功:"
405405

406406
#:../../library/__main__.rst:335
407407
msgid""
@@ -412,7 +412,7 @@ msgid ""
412412
msgstr""
413413
"請注意,引入 ``__main__`` 並不會因為不經意地執行放在 ``start`` 模組中 "
414414
"``if __name__ ==\"__main__\"`` 區塊的頂層程式碼(本來是給腳本使用的)而造成任何問題"
415-
"。為什麼這樣做會如期運作?"
415+
"。為什麼這樣做會如預期運作?"
416416

417417
#:../../library/__main__.rst:339
418418
msgid""
@@ -428,7 +428,7 @@ msgid ""
428428
msgstr""
429429
"當 Python 直譯器啟動時,會在 :data:`sys.modules` 中插入一個空的 ``__main__`` 模"
430430
"組,並透過執行頂層程式碼來填充它。在我們的範例中,這是 ``start`` 模組,它將逐"
431-
"行運行並引入 ``namely``。接著,``namely`` 引入 ``__main__``\\ (其實是 "
431+
"行執行並引入 ``namely``。接著,``namely`` 引入 ``__main__``\\ (其實是 "
432432
"``start``)。這就是一個引入循環!幸運的是,由於部分填充的 ``__main__`` 模組存"
433433
"在於 :data:`sys.modules` 中,Python 將其傳遞給 ``namely``。請參閱引入系統參考"
434434
"文件中的\\ :ref:`關於 __main__ 的特別考量 <import-dunder-main>`\\ 了解其工作原理"
@@ -440,15 +440,15 @@ msgid ""
440440
"anything defined in the REPL becomes part of the ``__main__`` scope::"
441441
msgstr""
442442
"Python REPL 是「頂層環境」的另一個範例,因此 REPL 中定義的任何內容都成為 "
443-
"作用範圍的一部分: ::"
443+
"作域的一部分: ::"
444444

445445
#:../../library/__main__.rst:364
446446
msgid""
447447
"Note that in this case the ``__main__`` scope doesn't contain a ``__file__`` "
448448
"attribute as it's interactive."
449449
msgstr""
450-
"請注意,在這種情況下, ``__main__`` 作用域不包含 ``__file__`` 屬性,因為它是可"
451-
"互動的。"
450+
"請注意,在這種情況下, ``__main__`` 作用域不包含 ``__file__`` 屬性,因為它是"
451+
"互動式的。"
452452

453453
#:../../library/__main__.rst:367
454454
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp