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

Sync with CPython 3.13#1142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mattwang44 merged 3 commits into3.13fromcron/sync/3.13
Sep 4, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 5 additions & 131 deletionsextending/extending.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-08-27 00:15+0000\n"
"POT-Creation-Date: 2025-09-04 00:15+0000\n"
"PO-Revision-Date: 2025-02-17 14:34+0000\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand DownExpand Up@@ -859,11 +859,11 @@ msgstr ""
#: ../../extending/extending.rst:428
msgid ""
"When embedding Python, the :c:func:`!PyInit_spam` function is not called "
"automatically unless there's an entry in the :c:data:`PyImport_Inittab` "
"automatically unless there's an entry in the :c:data:`!PyImport_Inittab` "
"table. To add the module to the initialization table, use :c:func:"
"`PyImport_AppendInittab`, optionally followed by an import of the module::"
msgstr ""
"嵌入 Python 時,除非在 :c:data:`PyImport_Inittab` 表中有相關條目,否則不會自"
"嵌入 Python 時,除非在 :c:data:`!PyImport_Inittab` 表中有相關條目,否則不會自"
"動呼叫 :c:func:`!PyInit_spam` 函式。要將模組加入初始化表,請使用 :c:func:"
"`PyImport_AppendInittab` 並在隨後選擇性地將該模組引入: ::"

Expand DownExpand Up@@ -1522,7 +1522,7 @@ msgstr ""

#: ../../extending/extending.rst:899
msgid "Reference Counts"
msgstr ""
msgstr "參照計數"

#: ../../extending/extending.rst:901
msgid ""
Expand DownExpand Up@@ -1616,7 +1616,7 @@ msgstr ""

#: ../../extending/extending.rst:971
msgid "Reference Counting in Python"
msgstr ""
msgstr "Python 中的參照計數"

#: ../../extending/extending.rst:973
msgid ""
Expand DownExpand Up@@ -2303,129 +2303,3 @@ msgstr "PyArg_ParseTupleAndKeywords(C 函式)"
#: ../../extending/extending.rst:797
msgid "Philbrick, Geoff"
msgstr "Philbrick, Geoff"

#~ msgid ""
#~ "All user-visible symbols defined by :file:`Python.h` have a prefix of "
#~ "``Py`` or ``PY``, except those defined in standard header files. For "
#~ "convenience, and since they are used extensively by the Python "
#~ "interpreter, ``\"Python.h\"`` includes a few standard header files: "
#~ "``<stdio.h>``, ``<string.h>``, ``<errno.h>``, and ``<stdlib.h>``. If the "
#~ "latter header file does not exist on your system, it declares the "
#~ "functions :c:func:`malloc`, :c:func:`free` and :c:func:`realloc` directly."
#~ msgstr ""
#~ "除了那些在標準標頭檔中定義的符號以外,所有由 :file:`Python.h` 定義的使用者"
#~ "可見符號 (user-visible symbols) 的前綴都是 ``Py`` 或 ``PY``。為了方便,也"
#~ "因為 Python 直譯器的大量使用,``\"Python.h\"`` 也引入了一些標準的標頭檔:"
#~ "``<stdio.h>``、``<string.h>``、``<errno.h>`` 和 ``<stdlib.h>``。如果 "
#~ "``<stdlib.h>`` 在你的系統上不存在,它會直接宣告 :c:func:`malloc`、:c:func:"
#~ "`free` 和 :c:func:`realloc` 函式。"

#~ msgid ""
#~ "and initialize it in your module's initialization function (:c:func:`!"
#~ "PyInit_spam`) with an exception object::"
#~ msgstr ""
#~ "並在你的模組初始化函式中使用一個例外物件來初始化它 (:c:func:`!"
#~ "PyInit_spam`): ::"

#~ msgid ""
#~ "PyMODINIT_FUNC\n"
#~ "PyInit_spam(void)\n"
#~ "{\n"
#~ " PyObject *m;\n"
#~ "\n"
#~ " m = PyModule_Create(&spammodule);\n"
#~ " if (m == NULL)\n"
#~ " return NULL;\n"
#~ "\n"
#~ " SpamError = PyErr_NewException(\"spam.error\", NULL, NULL);\n"
#~ " if (PyModule_AddObjectRef(m, \"error\", SpamError) < 0) {\n"
#~ " Py_CLEAR(SpamError);\n"
#~ " Py_DECREF(m);\n"
#~ " return NULL;\n"
#~ " }\n"
#~ "\n"
#~ " return m;\n"
#~ "}"
#~ msgstr ""
#~ "PyMODINIT_FUNC\n"
#~ "PyInit_spam(void)\n"
#~ "{\n"
#~ " PyObject *m;\n"
#~ "\n"
#~ " m = PyModule_Create(&spammodule);\n"
#~ " if (m == NULL)\n"
#~ " return NULL;\n"
#~ "\n"
#~ " SpamError = PyErr_NewException(\"spam.error\", NULL, NULL);\n"
#~ " if (PyModule_AddObjectRef(m, \"error\", SpamError) < 0) {\n"
#~ " Py_CLEAR(SpamError);\n"
#~ " Py_DECREF(m);\n"
#~ " return NULL;\n"
#~ " }\n"
#~ "\n"
#~ " return m;\n"
#~ "}"

#~ msgid ""
#~ "static struct PyModuleDef spammodule = {\n"
#~ " PyModuleDef_HEAD_INIT,\n"
#~ " \"spam\", /* name of module */\n"
#~ " spam_doc, /* module documentation, may be NULL */\n"
#~ " -1, /* size of per-interpreter state of the module,\n"
#~ " or -1 if the module keeps state in global variables. */\n"
#~ " SpamMethods\n"
#~ "};"
#~ msgstr ""
#~ "static struct PyModuleDef spammodule = {\n"
#~ " PyModuleDef_HEAD_INIT,\n"
#~ " \"spam\", /* 模組名稱 */\n"
#~ " spam_doc, /* 模組文件,可能為 NULL */\n"
#~ " -1, /* 模組的個別直譯器狀態的大小,\n"
#~ " 如果模組將狀態保存在全域變數中則為 -1 */\n"
#~ " SpamMethods\n"
#~ "};"

#~ msgid ""
#~ "When the Python program imports module :mod:`!spam` for the first time, :"
#~ "c:func:`!PyInit_spam` is called. (See below for comments about embedding "
#~ "Python.) It calls :c:func:`PyModule_Create`, which returns a module "
#~ "object, and inserts built-in function objects into the newly created "
#~ "module based upon the table (an array of :c:type:`PyMethodDef` "
#~ "structures) found in the module definition. :c:func:`PyModule_Create` "
#~ "returns a pointer to the module object that it creates. It may abort "
#~ "with a fatal error for certain errors, or return ``NULL`` if the module "
#~ "could not be initialized satisfactorily. The init function must return "
#~ "the module object to its caller, so that it then gets inserted into ``sys."
#~ "modules``."
#~ msgstr ""
#~ "當 Python 程式第一次引入模組 :mod:`!spam` 時,:c:func:`!PyInit_spam` 會被"
#~ "呼叫。(有關嵌入 Python 的註解請參見下文。)它會呼叫回傳一個模組物件的 :c:"
#~ "func:`PyModule_Create`,並根據在模組定義中所找到的表(一個 :c:type:"
#~ "`PyMethodDef` 結構的陣列)將內建的函式物件插入到新建立的模組中。:c:func:"
#~ "`PyModule_Create` 會回傳一個指向它建立之模組物件的指標。對於某些錯誤情況,"
#~ "它可能會以嚴重錯誤的形式來中止;如果模組無法令人滿意地被初始化,它也會回"
#~ "傳 ``NULL``。初始化函式必須把模組物件回傳給它的呼叫者,這樣它才會被插入到 "
#~ "``sys.modules`` 中。"

#~ msgid ""
#~ "Removing entries from ``sys.modules`` or importing compiled modules into "
#~ "multiple interpreters within a process (or following a :c:func:`fork` "
#~ "without an intervening :c:func:`exec`) can create problems for some "
#~ "extension modules. Extension module authors should exercise caution when "
#~ "initializing internal data structures."
#~ msgstr ""
#~ "從 ``sys.modules`` 中移除項目,或在一個行程中將已編譯模組引入到多個直譯器"
#~ "中(或在沒有 :c:func:`exec` 介入的情況下使用 :c:func:`fork`)可能會對某些"
#~ "擴充模組造成問題。擴充模組作者在初始化內部資料結構時應特別小心。"

#~ msgid ""
#~ "Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase "
#~ "initialization* (new in Python 3.5), where a PyModuleDef structure is "
#~ "returned from ``PyInit_spam``, and creation of the module is left to the "
#~ "import machinery. For details on multi-phase initialization, see :PEP:"
#~ "`489`."
#~ msgstr ""
#~ "不像我們的 ``spam`` 範例,``xxmodule`` 使用了\\ *多階段初始化 (multi-"
#~ "phase initialization)*\\ (Python 3.5 新增),其中的 PyModuleDef 結構會從 "
#~ "``PyInit_spam`` 回傳,而模組的建立則交由引入機制來完成。關於多階段初始化的"
#~ "詳細資訊請參閱 :PEP:`489`。"
56 changes: 28 additions & 28 deletionshowto/instrumentation.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date:2024-09-03 11:11+0800\n"
"POT-Creation-Date:2025-09-04 00:15+0000\n"
"PO-Revision-Date: 2023-08-17 22:17+0800\n"
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand DownExpand Up@@ -574,18 +574,18 @@ msgstr ""
msgid "(assuming a :ref:`debug build <debug-build>` of CPython 3.6)"
msgstr "(假設 CPython 3.6 的\\ :ref:`除錯建置版本 <debug-build>`)"

#: ../../howto/instrumentation.rst:273
#: ../../howto/instrumentation.rst:275
msgid "Available static markers"
msgstr "可用的靜態標記"

#: ../../howto/instrumentation.rst:277
#: ../../howto/instrumentation.rst:279
msgid ""
"This marker indicates that execution of a Python function has begun. It is "
"only triggered for pure-Python (bytecode) functions."
msgstr ""
"該標記表示 Python 函式的執行已經開始。它僅針對純 Python(位元組碼)函式觸發。"

#: ../../howto/instrumentation.rst:280
#: ../../howto/instrumentation.rst:282
msgid ""
"The filename, function name, and line number are provided back to the "
"tracing script as positional arguments, which must be accessed using "
Expand All@@ -594,25 +594,25 @@ msgstr ""
"檔案名稱、函式名稱和列號作為位置引數提供給追蹤腳本,必須使用 ``$arg1``、"
"``$arg2``、``$arg3`` 來存取:"

#: ../../howto/instrumentation.rst:284
#: ../../howto/instrumentation.rst:286
msgid ""
"``$arg1`` : ``(const char *)`` filename, accessible using "
"``user_string($arg1)``"
msgstr ""
"``$arg1`` : ``(const char *)`` 檔案名稱,可使用 ``user_string($arg1)`` 存取"

#: ../../howto/instrumentation.rst:286
#: ../../howto/instrumentation.rst:288
msgid ""
"``$arg2`` : ``(const char *)`` function name, accessible using "
"``user_string($arg2)``"
msgstr ""
"``$arg2`` :``(const char *)`` 函式名稱,可使用 ``user_string($arg2)`` 存取"

#: ../../howto/instrumentation.rst:289
#: ../../howto/instrumentation.rst:291
msgid "``$arg3`` : ``int`` line number"
msgstr "``$arg3`` : ``int`` 列號"

#: ../../howto/instrumentation.rst:293
#: ../../howto/instrumentation.rst:295
msgid ""
"This marker is the converse of :c:func:`!function__entry`, and indicates "
"that execution of a Python function has ended (either via ``return``, or via "
Expand All@@ -621,11 +621,11 @@ msgstr ""
"該標記與 :c:func:`!function__entry` 相反,表示 Python 函式的執行已結束(透過 "
"``return`` 或透過例外)。它僅針對純 Python(位元組碼)函式觸發。"

#: ../../howto/instrumentation.rst:297
#: ../../howto/instrumentation.rst:299
msgid "The arguments are the same as for :c:func:`!function__entry`"
msgstr "引數與 :c:func:`!function__entry` 相同"

#: ../../howto/instrumentation.rst:301
#: ../../howto/instrumentation.rst:303
msgid ""
"This marker indicates a Python line is about to be executed. It is the "
"equivalent of line-by-line tracing with a Python profiler. It is not "
Expand All@@ -634,39 +634,39 @@ msgstr ""
"該標記表示一列 Python 即將被執行。它相當於使用 Python 分析器來逐行追蹤。它不"
"在 C 函式內觸發。"

#: ../../howto/instrumentation.rst:305
#: ../../howto/instrumentation.rst:307
msgid "The arguments are the same as for :c:func:`!function__entry`."
msgstr "引數與 :c:func:`!function__entry` 相同。"

#: ../../howto/instrumentation.rst:309
#: ../../howto/instrumentation.rst:311
msgid ""
"Fires when the Python interpreter starts a garbage collection cycle. "
"``arg0`` is the generation to scan, like :func:`gc.collect`."
msgstr ""
"當 Python 直譯器開始垃圾回收 (garbage collection) 週期時觸發。``arg0`` 是要掃"
"描的一代 (generation),如 :func:`gc.collect`。"

#: ../../howto/instrumentation.rst:314
#: ../../howto/instrumentation.rst:316
msgid ""
"Fires when the Python interpreter finishes a garbage collection cycle. "
"``arg0`` is the number of collected objects."
msgstr "當 Python 直譯器完成垃圾回收週期時觸發。``arg0`` 是收集到的物件數量。"

#: ../../howto/instrumentation.rst:319
#: ../../howto/instrumentation.rst:321
msgid ""
"Fires before :mod:`importlib` attempts to find and load the module. ``arg0`` "
"is the module name."
msgstr "在 :mod:`importlib` 嘗試查找並載入模組之前觸發。``arg0`` 是模組名稱。"

#: ../../howto/instrumentation.rst:326
#: ../../howto/instrumentation.rst:328
msgid ""
"Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is "
"the module name, ``arg1`` indicates if module was successfully loaded."
msgstr ""
"在呼叫 :mod:`importlib` 的 find_and_load 函式後觸發。 ``arg0`` 是模組名稱,"
"``arg1`` 代表模組是否已成功載入。"

#: ../../howto/instrumentation.rst:335
#: ../../howto/instrumentation.rst:337
msgid ""
"Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is "
"the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a "
Expand All@@ -675,11 +675,11 @@ msgstr ""
"當呼叫 :func:`sys.audit` 或 :c:func:`PySys_Audit` 時觸發。``arg0`` 是 C 字串"
"形式的事件名稱,``arg1`` 是指向元組 (tuple) 物件的 :c:type:`PyObject` 指標。"

#: ../../howto/instrumentation.rst:343
#: ../../howto/instrumentation.rst:345
msgid "SystemTap Tapsets"
msgstr "SystemTap Tapsets"

#: ../../howto/instrumentation.rst:345
#: ../../howto/instrumentation.rst:347
msgid ""
"The higher-level way to use the SystemTap integration is to use a "
"\"tapset\": SystemTap's equivalent of a library, which hides some of the "
Expand All@@ -688,11 +688,11 @@ msgstr ""
"使用 SystemTap 整合的高階方法是使用 \"tapset\":SystemTap 相當於一個函式庫,"
"它隱藏了靜態標記的一些低階詳細資訊。"

#: ../../howto/instrumentation.rst:349
#: ../../howto/instrumentation.rst:351
msgid "Here is a tapset file, based on a non-shared build of CPython:"
msgstr "這是一個 tapset 檔案,是基於 CPython 的非共享建置版本:"

#: ../../howto/instrumentation.rst:351
#: ../../howto/instrumentation.rst:353
msgid ""
"/*\n"
" Provide a higher-level wrapping around the function__entry and\n"
Expand DownExpand Up@@ -733,23 +733,23 @@ msgstr ""
" frameptr = $arg4\n"
"}"

#: ../../howto/instrumentation.rst:372
#: ../../howto/instrumentation.rst:374
msgid ""
"If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/"
"systemtap/tapset``), then these additional probepoints become available:"
msgstr ""
"如果此檔案是安裝在 SystemTap 的 tapset 目錄中(例如 ``/usr/share/systemtap/"
"tapset``),則這些額外的探測點將可被使用:"

#: ../../howto/instrumentation.rst:378
#: ../../howto/instrumentation.rst:380
msgid ""
"This probe point indicates that execution of a Python function has begun. It "
"is only triggered for pure-Python (bytecode) functions."
msgstr ""
"該探測點表示 Python 函式的執行已經開始。它僅針對純 Python(位元組碼)函式觸"
"發。"

#: ../../howto/instrumentation.rst:383
#: ../../howto/instrumentation.rst:385
msgid ""
"This probe point is the converse of ``python.function.return``, and "
"indicates that execution of a Python function has ended (either via "
Expand All@@ -759,11 +759,11 @@ msgstr ""
"這個探測點與 ``python.function.return`` 相反,表示 Python 函式的執行已經結束"
"(透過 ``return`` 或者透過例外)。它僅針對純 Python(位元組碼)函式觸發。"

#: ../../howto/instrumentation.rst:390
#: ../../howto/instrumentation.rst:392
msgid "Examples"
msgstr "範例"

#: ../../howto/instrumentation.rst:391
#: ../../howto/instrumentation.rst:393
msgid ""
"This SystemTap script uses the tapset above to more cleanly implement the "
"example given above of tracing the Python function-call hierarchy, without "
Expand All@@ -772,7 +772,7 @@ msgstr ""
"此 SystemTap 腳本使用上面的 tapset 來更清晰地實作上面給出的追蹤 Python 函式呼"
"叫階層結構的範例,而無需直接命名靜態標記:"

#: ../../howto/instrumentation.rst:395
#: ../../howto/instrumentation.rst:397
msgid ""
"probe python.function.entry\n"
"{\n"
Expand All@@ -798,7 +798,7 @@ msgstr ""
" thread_indent(-1), funcname, filename, lineno);\n"
"}"

#: ../../howto/instrumentation.rst:410
#: ../../howto/instrumentation.rst:412
msgid ""
"The following script uses the tapset above to provide a top-like view of all "
"running CPython code, showing the top 20 most frequently entered bytecode "
Expand All@@ -807,7 +807,7 @@ msgstr ""
"以下腳本使用上面的 tapset 來提供所有正在運行之 CPython 程式碼的近乎最高層視"
"角,顯示整個系統中每秒最常被進入的 20 個位元組碼幀 (bytecode frame):"

#: ../../howto/instrumentation.rst:414
#: ../../howto/instrumentation.rst:416
msgid ""
"global fn_calls;\n"
"\n"
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp