@@ -625,6 +625,7 @@ msgid ""
625
625
"Raise a :exc:`SystemExit` exception, signaling an intention to exit the "
626
626
"interpreter."
627
627
msgstr ""
628
+ "引發 :exc:`SystemExit` 例外,表示意圖退出直譯器。"
628
629
629
630
#: ../../library/sys.rst:504
630
631
msgid ""
@@ -641,6 +642,7 @@ msgid ""
641
642
"code of 1. In particular, ``sys.exit(\" some error message\" )`` is a quick "
642
643
"way to exit a program when an error occurs."
643
644
msgstr ""
645
+ "選擇性引數 *arg* 可以是給出退出狀態的整數(預設為零),或其他型別的物件。如果它是整數,零被 shell 等視為「成功終止」,任何非零值被視為「異常終止」。大多數系統要求它在 0-127 範圍內,否則會產生未定義的結果。某些系統有將特定含義分配給特定退出代碼的慣例,但這些通常不太成熟;Unix 程式通常使用 2 來表示命令列語法錯誤,使用 1 來表示所有其他類型的錯誤。如果傳遞了其他型別的物件,``None`` 等同於傳遞零,任何其他物件會被列印到 :data:`stderr` 並導致退出代碼為 1。特別是,``sys.exit(\" some error message\" )`` 是在發生錯誤時退出程式的快速方法。"
644
646
645
647
#: ../../library/sys.rst:517
646
648
msgid ""
@@ -650,6 +652,7 @@ msgid ""
650
652
"statements are honored, and it is possible to intercept the exit attempt at "
651
653
"an outer level."
652
654
msgstr ""
655
+ "由於 :func:`exit` 最終「只是」引發例外,它只有在從主執行緒呼叫且例外未被攔截時才會退出程序。:keyword:`try` 陳述式的 finally 子句中指定的清理動作會被執行,並且可以在外層攔截退出嘗試。"
653
656
654
657
#: ../../library/sys.rst:522
655
658
msgid ""
@@ -1687,56 +1690,65 @@ msgid ""
1687
1690
"user's program. Arguments consumed by the interpreter itself will be present "
1688
1691
"in :data:`sys.orig_argv` and missing from :data:`sys.argv`."
1689
1692
msgstr ""
1693
+ ":data:`sys.orig_argv` 的元素是 Python 直譯器的引數,而 :data:`sys.argv` 的元素是使用者程式的引數。被直譯器本身消耗的引數會出現在 :data:`sys.orig_argv` 中,但在 :data:`sys.argv` 中會缺失。"
1690
1694
1691
1695
#: ../../library/sys.rst:1366
1692
1696
msgid ""
1693
1697
"A list of strings that specifies the search path for modules. Initialized "
1694
1698
"from the environment variable :envvar:`PYTHONPATH`, plus an installation-"
1695
1699
"dependent default."
1696
1700
msgstr ""
1701
+ "指定模組搜尋路徑的字串清單。從環境變數 :envvar:`PYTHONPATH` 初始化,加上依賴安裝的預設值。"
1697
1702
1698
1703
#: ../../library/sys.rst:1370
1699
1704
msgid ""
1700
1705
"By default, as initialized upon program startup, a potentially unsafe path "
1701
1706
"is prepended to :data:`sys.path` (*before* the entries inserted as a result "
1702
1707
"of :envvar:`PYTHONPATH`):"
1703
1708
msgstr ""
1709
+ "預設情況下,在程式啟動時初始化時,會將一個可能不安全的路徑前置到 :data:`sys.path`(在由於 :envvar:`PYTHONPATH` 而插入的條目*之前*):"
1704
1710
1705
1711
#: ../../library/sys.rst:1374
1706
1712
msgid ""
1707
1713
"``python -m module`` command line: prepend the current working directory."
1708
1714
msgstr ""
1715
+ "``python -m module`` 命令列:前置目前工作目錄。"
1709
1716
1710
1717
#: ../../library/sys.rst:1376
1711
1718
msgid ""
1712
1719
"``python script.py`` command line: prepend the script's directory. If it's a "
1713
1720
"symbolic link, resolve symbolic links."
1714
1721
msgstr ""
1722
+ "``python script.py`` 命令列:前置指令碼的目錄。如果它是符號連結,則解析符號連結。"
1715
1723
1716
1724
#: ../../library/sys.rst:1378
1717
1725
msgid ""
1718
1726
"``python -c code`` and ``python`` (REPL) command lines: prepend an empty "
1719
1727
"string, which means the current working directory."
1720
1728
msgstr ""
1729
+ "``python -c code`` 和 ``python``(REPL)命令列:前置空字串,這表示目前工作目錄。"
1721
1730
1722
1731
#: ../../library/sys.rst:1381
1723
1732
msgid ""
1724
1733
"To not prepend this potentially unsafe path, use the :option:`-P` command "
1725
1734
"line option or the :envvar:`PYTHONSAFEPATH` environment variable."
1726
1735
msgstr ""
1736
+ "為了不前置這個可能不安全的路徑,請使用 :option:`-P` 命令列選項或 :envvar:`PYTHONSAFEPATH` 環境變數。"
1727
1737
1728
1738
#: ../../library/sys.rst:1384
1729
1739
msgid ""
1730
1740
"A program is free to modify this list for its own purposes. Only strings "
1731
1741
"should be added to :data:`sys.path`; all other data types are ignored during "
1732
1742
"import."
1733
1743
msgstr ""
1744
+ "程式可以自由地為自己的目的修改這個清單。只能將字串加入到 :data:`sys.path`;所有其他資料型別在匯入時會被忽略。"
1734
1745
1735
1746
#: ../../library/sys.rst:1390
1736
1747
msgid ""
1737
1748
"Module :mod:`site` This describes how to use .pth files to extend :data:`sys."
1738
1749
"path`."
1739
1750
msgstr ""
1751
+ "模組 :mod:`site` 這描述了如何使用 .pth 檔案來擴展 :data:`sys.path`。"
1740
1752
1741
1753
#: ../../library/sys.rst:1395
1742
1754
msgid ""
@@ -2630,12 +2642,14 @@ msgid ""
2630
2642
"version information out of it, rather, use :data:`version_info` and the "
2631
2643
"functions provided by the :mod:`platform` module."
2632
2644
msgstr ""
2645
+ "包含 Python 直譯器版本號碼以及建置號碼和所使用編譯器的額外資訊的字串。這個字串會在啟動互動式直譯器時顯示。不要從中擷取版本資訊,而是應使用 :data:`version_info` 和 :mod:`platform` 模組提供的函式。"
2633
2646
2634
2647
#: ../../library/sys.rst:2016
2635
2648
msgid ""
2636
2649
"The C API version for this interpreter. Programmers may find this useful "
2637
2650
"when debugging version conflicts between Python and extension modules."
2638
2651
msgstr ""
2652
+ "此直譯器的 C API 版本。程式設計師在除錯 Python 和擴充模組之間的版本衝突時可能會發現這很有用。"
2639
2653
2640
2654
#: ../../library/sys.rst:2022
2641
2655
msgid ""
@@ -2647,6 +2661,7 @@ msgid ""
2647
2661
"also be accessed by name, so ``sys.version_info[0]`` is equivalent to ``sys."
2648
2662
"version_info.major`` and so on."
2649
2663
msgstr ""
2664
+ "包含版本號碼五個組成部分的元組:*major*、*minor*、*micro*、*releaselevel* 和 *serial*。除了 *releaselevel* 以外的所有值都是整數;發布級別是 ``'alpha'``、``'beta'``、``'candidate'`` 或 ``'final'``。對應於 Python 版本 2.0 的 ``version_info`` 值是 ``(2, 0, 0, 'final', 0)``。這些組成部分也可以透過名稱存取,所以 ``sys.version_info[0]`` 等同於 ``sys.version_info.major``,以此類推。"
2650
2665
2651
2666
#: ../../library/sys.rst:2030
2652
2667
msgid "Added named component attributes."
0 commit comments