Skip to content

Sync with CPython 3.12 #780

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 31 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9db5c19
sync with cpython c0de843c
github-actions[bot] Dec 29, 2023
d8b2cc3
sync with cpython 9a2dadf6
github-actions[bot] Dec 31, 2023
6a08878
sync with cpython f3d3663a
github-actions[bot] Jan 1, 2024
800e9f9
sync with cpython c7a1431c
github-actions[bot] Jan 2, 2024
54c2e60
sync with cpython 499f1d0a
github-actions[bot] Jan 3, 2024
0ae6b42
sync with cpython d3f2051e
github-actions[bot] Jan 3, 2024
9857832
sync with cpython 6d9af666
github-actions[bot] Jan 6, 2024
e2f3175
sync with cpython 159e3db1
github-actions[bot] Jan 10, 2024
490046b
sync with cpython 3f607a03
github-actions[bot] Jan 11, 2024
4576f5c
sync with cpython b902671d
github-actions[bot] Jan 12, 2024
a958b2a
sync with cpython 7b7cf75c
github-actions[bot] Jan 12, 2024
17580e6
sync with cpython 1ea66583
github-actions[bot] Jan 13, 2024
729e46c
sync with cpython cc11c76d
github-actions[bot] Jan 15, 2024
8ed9a3d
sync with cpython f6315edc
github-actions[bot] Jan 15, 2024
eae2777
sync with cpython b201a6a1
github-actions[bot] Jan 17, 2024
d6cfef7
sync with cpython f1f2d204
github-actions[bot] Jan 17, 2024
df7c66c
sync with cpython 2c9cf64a
github-actions[bot] Jan 18, 2024
f6ad870
fix: resolve fuzzy entries
mattwang44 Jan 18, 2024
c3e4960
sync with cpython f9158d63
github-actions[bot] Jan 19, 2024
9589042
fix: resolve fuzzy entries
mattwang44 Jan 20, 2024
a152f56
sync with cpython 48bff745
github-actions[bot] Jan 21, 2024
b3a8cc2
sync with cpython 33c1907d
github-actions[bot] Jan 22, 2024
a0272d5
sync with cpython 58fdd15d
github-actions[bot] Jan 22, 2024
3e2acc8
sync with cpython ed567c1e
github-actions[bot] Jan 23, 2024
d4d1133
sync with cpython 386c72d9
github-actions[bot] Jan 24, 2024
922d000
fix: resolve fuzzy entries
mattwang44 Jan 24, 2024
06bc0ff
sync with cpython ac5ed8a7
github-actions[bot] Jan 25, 2024
6f24566
fix: resolve fuzzy entries
mattwang44 Jan 25, 2024
cfb2019
sync with cpython bf35ac1d
github-actions[bot] Jan 27, 2024
3a5c637
fix: resolve fuzzy entries
mattwang44 Jan 27, 2024
49083e0
sync with cpython 84223a0e
github-actions[bot] Jan 27, 2024
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
183 changes: 84 additions & 99 deletions .scripts/poetry.lock

Large diffs are not rendered by default.

77 changes: 61 additions & 16 deletions c-api/conversion.po
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2023, Python Software Foundation
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
Expand All @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
"POT-Creation-Date: 2024-01-27 00:03+0000\n"
"PO-Revision-Date: 2023-12-11 18:26+0000\n"
"Last-Translator: Matt Wang <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -112,6 +112,51 @@ msgstr "以下函式提供與區域設定無關 (locale-independent) 的字串

#: ../../c-api/conversion.rst:53
msgid ""
"Convert the initial part of the string in ``str`` to an :c:expr:`unsigned "
"long` value according to the given ``base``, which must be between ``2`` and "
"``36`` inclusive, or be the special value ``0``."
msgstr ""

#: ../../c-api/conversion.rst:57
msgid ""
"Leading white space and case of characters are ignored. If ``base`` is zero "
"it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If "
"these are absent it defaults to ``10``. Base must be 0 or between 2 and 36 "
"(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the "
"end of the scan."
msgstr ""

#: ../../c-api/conversion.rst:63
msgid ""
"If the converted value falls out of range of corresponding return type, "
"range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and :c:"
"macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0`` is "
"returned."
msgstr ""

#: ../../c-api/conversion.rst:68
msgid "See also the Unix man page :manpage:`strtoul(3)`."
msgstr "也請見 Unix 手冊頁面 :manpage:`strtoul(3)`。"

#: ../../c-api/conversion.rst:75
msgid ""
"Convert the initial part of the string in ``str`` to an :c:expr:`long` value "
"according to the given ``base``, which must be between ``2`` and ``36`` "
"inclusive, or be the special value ``0``."
msgstr ""

#: ../../c-api/conversion.rst:79
msgid ""
"Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead "
"and :c:macro:`LONG_MAX` on overflows."
msgstr ""

#: ../../c-api/conversion.rst:82
msgid "See also the Unix man page :manpage:`strtol(3)`."
msgstr "也請見 Unix 手冊頁面 :manpage:`strtol(3)`。"

#: ../../c-api/conversion.rst:89
msgid ""
"Convert a string ``s`` to a :c:expr:`double`, raising a Python exception on "
"failure. The set of accepted strings corresponds to the set of strings "
"accepted by Python's :func:`float` constructor, except that ``s`` must not "
Expand All @@ -122,7 +167,7 @@ msgstr ""
"對應於 Python 的 :func:`float` 建構函式接受的字串集合,但 ``s`` 不得有前導或"
"尾隨的空格。轉換與目前區域設定無關。"

#: ../../c-api/conversion.rst:59
#: ../../c-api/conversion.rst:95
msgid ""
"If ``endptr`` is ``NULL``, convert the whole string. Raise :exc:"
"`ValueError` and return ``-1.0`` if the string is not a valid representation "
Expand All @@ -131,7 +176,7 @@ msgstr ""
"如果 ``endptr`` 為 ``NULL``,則轉換整個字串。如果字串不是浮點數的有效表示,則"
"引發 :exc:`ValueError` 並回傳 ``-1.0``。"

#: ../../c-api/conversion.rst:63
#: ../../c-api/conversion.rst:99
msgid ""
"If endptr is not ``NULL``, convert as much of the string as possible and set "
"``*endptr`` to point to the first unconverted character. If no initial "
Expand All @@ -143,7 +188,7 @@ msgstr ""
"個未轉換的字元。如果字串的初始片段都不是浮點數的有效表示,則設定 ``*endptr`` "
"指向字串的開頭,引發 ValueError 並回傳 ``-1.0``。"

#: ../../c-api/conversion.rst:70
#: ../../c-api/conversion.rst:106
msgid ""
"If ``s`` represents a value that is too large to store in a float (for "
"example, ``\"1e500\"`` is such a string on many platforms) then if "
Expand All @@ -160,23 +205,23 @@ msgstr ""
"``-1.0``。在這兩種情況下,將 ``*endptr`` 設定為指向轉換後的值之後的第一個字"
"元。"

#: ../../c-api/conversion.rst:78
#: ../../c-api/conversion.rst:114
msgid ""
"If any other error occurs during the conversion (for example an out-of-"
"memory error), set the appropriate Python exception and return ``-1.0``."
msgstr ""
"如果轉換期間發生任何其他錯誤(例如記憶體不足的錯誤),請設定適當的 Python 例"
"外並回傳 ``-1.0``。"

#: ../../c-api/conversion.rst:87
#: ../../c-api/conversion.rst:123
msgid ""
"Convert a :c:expr:`double` *val* to a string using supplied *format_code*, "
"*precision*, and *flags*."
msgstr ""
"使用提供的 *format_code*、*precision* 和 *flags* 將 :c:expr:`double` *val* 轉"
"換為字串。"

#: ../../c-api/conversion.rst:90
#: ../../c-api/conversion.rst:126
msgid ""
"*format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``, "
"``'G'`` or ``'r'``. For ``'r'``, the supplied *precision* must be 0 and is "
Expand All @@ -186,36 +231,36 @@ msgstr ""
"``'r'`` 其中之一。對於 ``'r'``,提供的 *precision* 必須為 0 並會被忽略。"
"``'r'`` 格式碼指定標準 :func:`repr` 格式。"

#: ../../c-api/conversion.rst:95
#: ../../c-api/conversion.rst:131
msgid ""
"*flags* can be zero or more of the values ``Py_DTSF_SIGN``, "
"``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:"
msgstr ""
"*flags* 可以是零個或多個值 ``Py_DTSF_SIGN``、``Py_DTSF_ADD_DOT_0`` 或 "
"``Py_DTSF_ALT``,會被聯集在一起:"

#: ../../c-api/conversion.rst:98
#: ../../c-api/conversion.rst:134
msgid ""
"``Py_DTSF_SIGN`` means to always precede the returned string with a sign "
"character, even if *val* is non-negative."
msgstr ""
"``Py_DTSF_SIGN`` 代表總是在回傳的字串前面加上符號字元,即使 *val* 非負數。"

#: ../../c-api/conversion.rst:101
#: ../../c-api/conversion.rst:137
msgid ""
"``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look "
"like an integer."
msgstr "``Py_DTSF_ADD_DOT_0`` 代表確保回傳的字串看起來不會像整數。"

#: ../../c-api/conversion.rst:104
#: ../../c-api/conversion.rst:140
msgid ""
"``Py_DTSF_ALT`` means to apply \"alternate\" formatting rules. See the "
"documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for details."
msgstr ""
"``Py_DTSF_ALT`` 代表要套用「備用的 (alternate)」格式化規則。有關詳細資訊,請"
"參閱 :c:func:`PyOS_snprintf` ``'#'`` 的文件。"

#: ../../c-api/conversion.rst:108
#: ../../c-api/conversion.rst:144
msgid ""
"If *ptype* is non-``NULL``, then the value it points to will be set to one "
"of ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying "
Expand All @@ -226,7 +271,7 @@ msgstr ""
"``Py_DTST_INFINITE`` 或 ``Py_DTST_NAN`` 其中之一,分別代表 *val* 是有限數、無"
"限數或非數。"

#: ../../c-api/conversion.rst:112
#: ../../c-api/conversion.rst:148
msgid ""
"The return value is a pointer to *buffer* with the converted string or "
"``NULL`` if the conversion failed. The caller is responsible for freeing the "
Expand All @@ -235,15 +280,15 @@ msgstr ""
"回傳值是指向 *buffer* 的指標,其中包含轉換後的字串,如果轉換失敗則回傳 "
"``NULL``。呼叫者負責透過呼叫 :c:func:`PyMem_Free` 來釋放回傳的字串。"

#: ../../c-api/conversion.rst:121
#: ../../c-api/conversion.rst:157
msgid ""
"Case insensitive comparison of strings. The function works almost "
"identically to :c:func:`!strcmp` except that it ignores the case."
msgstr ""
"不區分大小寫的字串比較。函式的作用方式幾乎與 :c:func:`!strcmp` 相同,只是它忽"
"略大小寫。"

#: ../../c-api/conversion.rst:127
#: ../../c-api/conversion.rst:163
msgid ""
"Case insensitive comparison of strings. The function works almost "
"identically to :c:func:`!strncmp` except that it ignores the case."
Expand Down
4 changes: 2 additions & 2 deletions c-api/exceptions.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-14 00:03+0000\n"
"POT-Creation-Date: 2024-01-01 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 14:05+0000\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -454,7 +454,7 @@ msgstr ""
#: ../../c-api/exceptions.rst:429
msgid ""
"Return the exception currently being raised, clearing the error indicator at "
"the same time."
"the same time. Return ``NULL`` if the error indicator is not set."
msgstr ""

#: ../../c-api/exceptions.rst:432
Expand Down
12 changes: 6 additions & 6 deletions c-api/memory.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-17 00:03+0000\n"
"POT-Creation-Date: 2024-01-22 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 14:06+0000\n"
"Last-Translator: Adrian Liaw <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
Expand Down Expand Up @@ -329,16 +329,16 @@ msgstr ""
#: ../../c-api/memory.rst:269
msgid ""
"Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes "
"of memory. Returns a pointer cast to :c:expr:`TYPE*`. The memory will not "
"have been initialized in any way."
"of memory. Returns a pointer cast to ``TYPE*``. The memory will not have "
"been initialized in any way."
msgstr ""

#: ../../c-api/memory.rst:276
msgid ""
"Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * "
"sizeof(TYPE))`` bytes. Returns a pointer cast to :c:expr:`TYPE*`. On "
"return, *p* will be a pointer to the new memory area, or ``NULL`` in the "
"event of failure."
"sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* "
"will be a pointer to the new memory area, or ``NULL`` in the event of "
"failure."
msgstr ""

#: ../../c-api/memory.rst:281
Expand Down
Loading