-
-
Notifications
You must be signed in to change notification settings - Fork 214
Translate c-api/refcounting.po
#559
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,7 +9,7 @@ msgstr "" | |||||||||||||||||||
"Project-Id-Version: Python 3.12\n" | ||||||||||||||||||||
"Report-Msgid-Bugs-To: \n" | ||||||||||||||||||||
"POT-Creation-Date: 2023-07-24 00:03+0000\n" | ||||||||||||||||||||
"PO-Revision-Date: 2023-07-01 14:19+0800\n" | ||||||||||||||||||||
"PO-Revision-Date: 2023-08-06 14:19+0800\n" | ||||||||||||||||||||
"Last-Translator: Matt Wang <mattwang44@gmail.com>\n" | ||||||||||||||||||||
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" | ||||||||||||||||||||
"tw)\n" | ||||||||||||||||||||
|
@@ -37,15 +37,15 @@ msgstr "取得物件 *o* 的參照計數。" | |||||||||||||||||||
#: ../../c-api/refcounting.rst:18 | ||||||||||||||||||||
msgid "" | ||||||||||||||||||||
"Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr "使用 :c:func:`Py_SET_REFCNT()` 函式設定物件參照計數。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:20 | ||||||||||||||||||||
msgid "The parameter type is no longer :c:expr:`const PyObject*`." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr "參數型別不再是 :c:expr:`const PyObject*`。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:23 | ||||||||||||||||||||
msgid ":c:func:`Py_REFCNT()` is changed to the inline static function." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr ":c:func:`Py_REFCNT()` 更改為行內靜態函式 (inline static function)。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:29 | ||||||||||||||||||||
msgid "Set the object *o* reference counter to *refcnt*." | ||||||||||||||||||||
|
@@ -124,7 +124,7 @@ msgstr "" | |||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:74 | ||||||||||||||||||||
msgid "See also :c:func:`Py_INCREF`." | ||||||||||||||||||||
msgstr "另請參閱 :c:func:`Py_INCREF`\\ 。" | ||||||||||||||||||||
msgstr "另請參閱 :c:func:`Py_INCREF`。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:81 | ||||||||||||||||||||
msgid "Similar to :c:func:`Py_NewRef`, but the object *o* can be NULL." | ||||||||||||||||||||
|
@@ -173,12 +173,12 @@ msgid "" | |||||||||||||||||||
"object in a temporary variable, update the list data structure, and then " | ||||||||||||||||||||
"call :c:func:`Py_DECREF` for the temporary variable." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`~object.__del__` 方" | ||||||||||||||||||||
"法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但執行的程式碼可以自" | ||||||||||||||||||||
"由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之前,可從全域" | ||||||||||||||||||||
"變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程式碼應將已刪" | ||||||||||||||||||||
"除物件的參照複製到臨時變數中,更新 list 資料結構,然後為臨時變數呼叫 :c:func:" | ||||||||||||||||||||
"`Py_DECREF`。" | ||||||||||||||||||||
"釋放函式可以導致任意 Python 程式碼被調用(例如,當釋放具有 :meth:`~object." | ||||||||||||||||||||
"__del__` 方法的類別實例時)。雖然此類程式碼中的例外不會被傳遞出來,但執行的程" | ||||||||||||||||||||
"式碼可以自由存取所有 Python 全域變數。這意味著在調用 :c:func:`Py_DECREF` 之" | ||||||||||||||||||||
"前,可從全域變數存取的任何物件都應處於一致狀態。例如,從 list 中刪除物件的程" | ||||||||||||||||||||
"式碼應將已刪除物件的參照複製到臨時變數中,更新 list 資料結構,然後為臨時變數" | ||||||||||||||||||||
"呼叫 :c:func:`Py_DECREF`。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:115 | ||||||||||||||||||||
msgid "" | ||||||||||||||||||||
|
@@ -215,6 +215,8 @@ msgid "" | |||||||||||||||||||
"The macro argument is now only evaluated once. If the argument has side " | ||||||||||||||||||||
"effects, these are no longer duplicated." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
"巨集引數現在僅會被求值 (evaluate) 一次。如果引數有其他副作用,則不再重複作" | ||||||||||||||||||||
"用。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:139 | ||||||||||||||||||||
msgid "" | ||||||||||||||||||||
|
@@ -236,40 +238,35 @@ msgstr "" | |||||||||||||||||||
msgid "" | ||||||||||||||||||||
"Macro safely decrementing the `dst` reference count and setting `dst` to " | ||||||||||||||||||||
"`src`." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr "巨集安全地減少 `dst` 參照計數並將 `dst` 設定為 `src`。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:154 | ||||||||||||||||||||
msgid "As in case of :c:func:`Py_CLEAR`, \"the obvious\" code can be deadly::" | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr "與 :c:func:`Py_CLEAR` 的情況一樣,「明顯的」程式碼可能是致命的: ::" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:159 | ||||||||||||||||||||
msgid "The safe way is::" | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr "安全的方法是: ::" | ||||||||||||||||||||
mattwang44 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:163 | ||||||||||||||||||||
msgid "" | ||||||||||||||||||||
"That arranges to set `dst` to `src` _before_ decrementing reference count of " | ||||||||||||||||||||
"*dst* old value, so that any code triggered as a side-effect of `dst` " | ||||||||||||||||||||
"getting torn down no longer believes `dst` points to a valid object." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
"這會在減少 `dst` 舊值的參照計數\\ _之前_\\ 將 `dst` 設定為 `src`,使得因 " | ||||||||||||||||||||
"`dst` 被拆除而觸發的任何程式碼不會相信 `dst` 有指向一個有效物件。" | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 這句好難喔@@
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
如果改成這樣呢?
Suggested change
|
||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:169 ../../c-api/refcounting.rst:181 | ||||||||||||||||||||
msgid "" | ||||||||||||||||||||
"The macro arguments are now only evaluated once. If an argument has side " | ||||||||||||||||||||
"effects, these are no longer duplicated." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
msgstr "巨集引數現在僅會被求值一次。如果引數有其他副作用,則不再重複作用。" | ||||||||||||||||||||
|
||||||||||||||||||||
#: ../../c-api/refcounting.rst:176 | ||||||||||||||||||||
msgid "" | ||||||||||||||||||||
"Variant of :c:macro:`Py_SETREF` macro that uses :c:func:`Py_XDECREF` instead " | ||||||||||||||||||||
"of :c:func:`Py_DECREF`." | ||||||||||||||||||||
msgstr "" | ||||||||||||||||||||
|
||||||||||||||||||||
#~ msgid "" | ||||||||||||||||||||
#~ "The following functions or macros are only for use within the interpreter " | ||||||||||||||||||||
#~ "core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:" | ||||||||||||||||||||
#~ "`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`." | ||||||||||||||||||||
#~ msgstr "" | ||||||||||||||||||||
#~ "以下函式或巨集僅在直譯器核心內使用::c:func:`_Py_Dealloc`、:c:func:" | ||||||||||||||||||||
#~ "`_Py_ForgetReference`、:c:func:`_Py_NewReference` 以及全域變數 :c:data:" | ||||||||||||||||||||
#~ "`_Py_RefTotal`。" | ||||||||||||||||||||
":c:macro:`Py_SETREF` 巨集的變體,請改用 :c:func:`Py_XDECREF` 而非 :c:func:" | ||||||||||||||||||||
"`Py_DECREF`。" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.