Expand Up @@ -2,13 +2,15 @@ # This file is distributed under the same license as the Python package. # # Translators: # Liang-Bo Wang <me@liang2.tw>, 2015 # Dr-XYZ <dr.xyz.tw@gmail.com>, 2025 msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-30 00:13+0000\n" "PO-Revision-Date:2015-12-09 17:51+0000 \n" "Last-Translator:Liang-Bo Wang <me@liang2.tw >\n" "PO-Revision-Date:2025-07-17 17:00+0800 \n" "Last-Translator:Dr-XYZ <dr.xyz.tw@gmail.com >\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" Expand All @@ -31,6 +33,8 @@ msgid "" "modules. The documentation can be presented as pages of text on the " "console, served to a web browser, or saved to HTML files." msgstr "" ":mod:`!pydoc` 模組會自動從 Python 模組產生文件。文件可以以文字頁面的形式呈現" "在主控台上、提供給網頁瀏覽器,或儲存為 HTML 檔案。" #: ../../library/pydoc.rst:23 msgid "" Expand All @@ -42,6 +46,11 @@ msgid "" "the source file, or at the top of the module (see :func:`inspect." "getcomments`)." msgstr "" "對於模組、類別、函式和方法,所顯示的文件是從物件的說明字串(也就是物件" "的 :attr:`~definition.__doc__` 屬性)以及遞迴地從其可文件化成員的說明字串所" "取得。如果沒有說明字串,:mod:`!pydoc` 會嘗試從原始碼檔案中,類別、函式或方法" "定義正上方的註解區塊,或從模組的頂部取得描述(參見 :func:`inspect." "getcomments`)。" #: ../../library/pydoc.rst:30 msgid "" Expand All @@ -51,6 +60,10 @@ msgid "" "be viewed from outside the Python interpreter by running :program:`pydoc` as " "a script at the operating system's command prompt. For example, running ::" msgstr "" "內建函式 :func:`help` 會在互動式直譯器中呼叫線上幫助系統,它會使用 :mod:`!" "pydoc` 在主控台上以文字形式產生文件。同樣的文字文件也可以在 Python 直譯器外部" "檢視,方法是在作業系統的命令提示字元中,將 :program:`pydoc` 當作腳本執行。例" "如,執行: ::" #: ../../library/pydoc.rst:36 msgid "python -m pydoc sys" Expand All @@ -67,6 +80,12 @@ msgid "" "system, such as a slash in Unix), and refers to an existing Python source " "file, then documentation is produced for that file." msgstr "" "在 shell 提示字元下,將會顯示 :mod:`sys` 模組的文件,其風格類似於 Unix :" "program:`man` 命令所顯示的手冊頁面。:program:`pydoc` 的引數可以是函式、模組或" "套件的名稱,或是一個指向模組中或套件中模組內的類別、方法或函式的點號參照 (dotted reference)。如" "果 :program:`pydoc` 的引數看起來像一個路徑(也就是說,它包含你作業系統的路徑" "分隔符,例如 Unix 中的斜線),並且指向一個已存在的 Python 原始碼檔案,那麼就" "會為該檔案產生文件。" #: ../../library/pydoc.rst:49 msgid "" Expand All @@ -75,6 +94,9 @@ msgid "" "executed on that occasion. Use an ``if __name__ == '__main__':`` guard to " "only execute code when a file is invoked as a script and not just imported." msgstr "" "為了找到物件及其文件,:mod:`!pydoc` 會引入要文件化的模組。因此,任何在模組層" "級的程式碼都會在那個時候被執行。使用 ``if __name__ == '__main__':`` 的防護措" "施,可以確保程式碼只在檔案作為腳本被呼叫時執行,而不會在被引入時就執行。" #: ../../library/pydoc.rst:54 msgid "" Expand All @@ -83,13 +105,18 @@ msgid "" "envvar:`PAGER` environment variable is set, :program:`pydoc` will use its " "value as a pagination program. When both are set, :envvar:`MANPAGER` is used." msgstr "" "當在主控台印出輸出內容時,:program:`pydoc` 會嘗試將輸出內容做分頁以便於閱讀。如果 :envvar:" "`MANPAGER` 或 :envvar:`PAGER` 環境變數其中之一被設定,:program:`pydoc` 將會使" "用其值作為分頁程式。當兩者都被設定時,會使用 :envvar:`MANPAGER`。" #: ../../library/pydoc.rst:59 msgid "" "Specifying a ``-w`` flag before the argument will cause HTML documentation " "to be written out to a file in the current directory, instead of displaying " "text on the console." msgstr "" "在引數前指定一個 ``-w`` 旗標,將會使 HTML 文件被寫入目前目錄的一個檔案中,而" "不是在主控台上顯示文字。" #: ../../library/pydoc.rst:63 msgid "" Expand All @@ -98,6 +125,9 @@ msgid "" "manner similar to the Unix :program:`man` command. The synopsis line of a " "module is the first line of its documentation string." msgstr "" "在引數前指定一個 ``-k`` 旗標,將會搜尋所有可用模組的摘要行 (synopsis lines),尋找作為引數給出" "的關鍵字,其方式同樣類似於 Unix 的 :program:`man` 命令。一個模組的摘要行是其" "說明字串的第一行。" #: ../../library/pydoc.rst:68 msgid "" Expand All @@ -108,6 +138,10 @@ msgid "" "preferred web browser. Specifying ``0`` as the port number will select an " "arbitrary unused port." msgstr "" "你也可以使用 :program:`pydoc` 在本機上啟動一個 HTTP 伺服器,它會向來訪的網頁" "瀏覽器提供文件。:program:`python -m pydoc -p 1234` 將會在 1234 埠啟動一個 " "HTTP 伺服器,讓你可以用你偏好的網頁瀏覽器在 ``http://localhost:1234/`` 瀏覽文" "件。指定 ``0`` 作為通訊埠編號將會選擇一個任意未使用的通訊埠。" #: ../../library/pydoc.rst:74 msgid "" Expand All @@ -117,6 +151,10 @@ msgid "" "host name that the server responds to. During development this is " "especially useful if you want to run pydoc from within a container." msgstr "" ":program:`python -m pydoc -n <hostname>` 將會啟動伺服器並在給定的主機名稱上監" "聽。預設的主機名稱是 'localhost',但如果你希望伺服器能被其他機器連線,你可能" "會想改變伺服器回應的主機名稱。在開發期間,如果你想在容器內執行 pydoc,這點特" "別有用。" #: ../../library/pydoc.rst:80 msgid "" Expand All @@ -126,6 +164,11 @@ msgid "" "modules with a keyword in their synopsis line, and go to the *Module index*, " "*Topics* and *Keywords* pages." msgstr "" ":program:`python -m pydoc -b` 將會啟動伺服器,並額外開啟一個網頁瀏覽器到模組" "索引頁面。每個提供的頁面頂部都有一個導覽列,你可以在那裡 *Get*\\ (取得)個別" "項目的幫助、*Search*\\ (搜尋)所有在其摘要行中包含關鍵字的模組,以及前往 " "*Module index*\\ (模組索引)、*Topics*\\ (主題)和 *Keywords*\\ (關鍵字)" "頁面。" #: ../../library/pydoc.rst:86 msgid "" Expand All @@ -134,6 +177,9 @@ msgid "" "spam` documents precisely the version of the module you would get if you " "started the Python interpreter and typed ``import spam``." msgstr "" "當 :program:`pydoc` 產生文件時,它會使用目前的環境和路徑來定位模組。因此,呼" "叫 :program:`pydoc spam` 所產生的文件,會完全對應到你啟動 Python 直譯器並輸" "入 ``import spam`` 時所取得的模組版本。" #: ../../library/pydoc.rst:91 msgid "" Expand All @@ -143,6 +189,10 @@ msgid "" "envvar:`!PYTHONDOCS` environment variable to a different URL or to a local " "directory containing the Library Reference Manual pages." msgstr "" "核心模組的文件被假定存放在 ``https://docs.python.org/X.Y/library/``,其中 " "``X`` 和 ``Y`` 是 Python 直譯器的主版本號和次版本號。這可以透過將 :envvar:`!" "PYTHONDOCS` 環境變數設定為不同的 URL 或包含函式庫參考手冊頁面的本機目錄來覆" "寫。" #: ../../library/pydoc.rst:98 msgid "Added the ``-b`` option." Expand All @@ -157,6 +207,8 @@ msgid "" ":mod:`!pydoc` now uses :func:`inspect.signature` rather than :func:`inspect." "getfullargspec` to extract signature information from callables." msgstr "" ":mod:`!pydoc` 現在使用 :func:`inspect.signature` 而不是 :func:`inspect." "getfullargspec` 來從可呼叫物件中提取簽章資訊。" #: ../../library/pydoc.rst:109 msgid "Added the ``-n`` option." Expand Down