1- # SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2022, Python Software Foundation
1+ # Copyright (C) 2001-2024, Python Software Foundation
32# This file is distributed under the same license as the Python package.
43#
54# Translators:
5+ # Matt Wang <mattwang44@gmail.com>, 2024
66msgid ""
77msgstr ""
88"Project-Id-Version :Python 3.12\n "
99"Report-Msgid-Bugs-To :\n "
1010"POT-Creation-Date :2023-09-03 00:03+0000\n "
11- "PO-Revision-Date :2018 -05-23 14:32+0000 \n "
12- "Last-Translator :Adrian Liaw <adrianliaw2000 @gmail.com>\n "
11+ "PO-Revision-Date :2024 -05-11 14:32+0800 \n "
12+ "Last-Translator :Matt Wang <mattwang44 @gmail.com>\n "
1313"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1414"tw)\n "
1515"Language :zh_TW\n "
@@ -27,6 +27,8 @@ msgid ""
2727"See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and :c:func:"
2828"`PyObject_DelItem`."
2929msgstr ""
30+ "另請參閱 :c:func:`PyObject_GetItem`、:c:func:`PyObject_SetItem` 和 :c:func:"
31+ "`PyObject_DelItem`。"
3032
3133#: ../../c-api/mapping.rst:14
3234msgid ""
@@ -36,88 +38,110 @@ msgid ""
3638"to determine what type of keys the class supports. This function always "
3739"succeeds."
3840msgstr ""
41+ "如果物件有提供對映協定或支援切片 (slicing) 則回傳 ``1``,否則回傳 ``0``。請注"
42+ "意,對於具有 :meth:`~object.__getitem__` 方法的 Python 類別,它會回傳 ``1``,"
43+ "因為通常無法確定該類別支援什麼類型的鍵。這個函式總會是成功的。"
3944
4045#: ../../c-api/mapping.rst:25
4146msgid ""
4247"Returns the number of keys in object *o* on success, and ``-1`` on failure. "
4348"This is equivalent to the Python expression ``len(o)``."
4449msgstr ""
50+ "成功時回傳物件 *o* 中的鍵數,失敗時回傳 ``-1``。這相當於 Python 運算式 "
51+ "``len(o)``。"
4552
4653#: ../../c-api/mapping.rst:31
4754msgid ""
4855"This is the same as :c:func:`PyObject_GetItem`, but *key* is specified as a :"
4956"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
5057"`PyObject*`."
5158msgstr ""
59+ "這與 :c:func:`PyObject_GetItem` 相同,但 *key* 被指定為 :c:expr:`const "
60+ "char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"
5261
5362#: ../../c-api/mapping.rst:38
5463msgid ""
5564"This is the same as :c:func:`PyObject_SetItem`, but *key* is specified as a :"
5665"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
5766"`PyObject*`."
5867msgstr ""
68+ "這與 :c:func:`PyObject_SetItem` 相同,但 *key* 被指定為 :c:expr:`const "
69+ "char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"
5970
6071#: ../../c-api/mapping.rst:45
6172msgid "This is an alias of :c:func:`PyObject_DelItem`."
62- msgstr ""
73+ msgstr "這是 :c:func:`PyObject_DelItem` 的別名。 "
6374
6475#: ../../c-api/mapping.rst:50
6576msgid ""
6677"This is the same as :c:func:`PyObject_DelItem`, but *key* is specified as a :"
6778"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
6879"`PyObject*`."
6980msgstr ""
81+ "這與 :c:func:`PyObject_DelItem` 相同,但 *key* 被指定為 :c:expr:`const "
82+ "char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"
7083
7184#: ../../c-api/mapping.rst:57
7285msgid ""
7386"Return ``1`` if the mapping object has the key *key* and ``0`` otherwise. "
7487"This is equivalent to the Python expression ``key in o``. This function "
7588"always succeeds."
7689msgstr ""
90+ "如果對映物件具有鍵 *key* 則回傳 ``1``,否則回傳 ``0``。這相當於 Python 運算"
91+ "式 ``key in o``。這個函式總會是成功的。"
7792
7893#: ../../c-api/mapping.rst:63
7994msgid ""
8095"Exceptions which occur when this calls :meth:`~object.__getitem__` method "
8196"are silently ignored. For proper error handling, use :c:func:"
8297"`PyObject_GetItem()` instead."
8398msgstr ""
99+ "當它呼叫 :meth:`~object.__getitem__` 方法時發生的例外將被默默忽略。為了適當地"
100+ "處理錯誤,請改用 :c:func:`PyObject_GetItem()`。"
84101
85102#: ../../c-api/mapping.rst:70
86103msgid ""
87104"This is the same as :c:func:`PyMapping_HasKey`, but *key* is specified as a :"
88105"c:expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:"
89106"`PyObject*`."
90107msgstr ""
108+ "這與 :c:func:`PyMapping_HasKey` 相同,但 *key* 被指定為 :c:expr:`const "
109+ "char*` UTF-8 編碼位元組字串,而不是 :c:expr:`PyObject*`。"
91110
92111#: ../../c-api/mapping.rst:76
93112msgid ""
94113"Exceptions that occur when this calls :meth:`~object.__getitem__` method or "
95114"while creating the temporary :class:`str` object are silently ignored. For "
96115"proper error handling, use :c:func:`PyMapping_GetItemString` instead."
97116msgstr ""
117+ "當它呼叫 :meth:`~object.__getitem__` 方法或建立臨時 :class:`str` 物件時發生的"
118+ "例外將被默默忽略。為了適當地處理錯誤,請改用 :c:func:"
119+ "`PyMapping_GetItemString`。"
98120
99121#: ../../c-api/mapping.rst:84
100122msgid ""
101123"On success, return a list of the keys in object *o*. On failure, return "
102124"``NULL``."
103- msgstr ""
125+ msgstr "成功時回傳一個物件 *o* 內之鍵的串列,失敗時回傳 ``NULL``。 "
104126
105127#: ../../c-api/mapping.rst:87 ../../c-api/mapping.rst:96
106128#: ../../c-api/mapping.rst:105
107129msgid "Previously, the function returned a list or a tuple."
108- msgstr ""
130+ msgstr "在以前,該函式會回傳串列或元組。 "
109131
110132#: ../../c-api/mapping.rst:93
111133msgid ""
112134"On success, return a list of the values in object *o*. On failure, return "
113135"``NULL``."
114- msgstr ""
136+ msgstr "成功時回傳物件 *o* 中值的串列。失敗時回傳 ``NULL``。 "
115137
116138#: ../../c-api/mapping.rst:102
117139msgid ""
118140"On success, return a list of the items in object *o*, where each item is a "
119141"tuple containing a key-value pair. On failure, return ``NULL``."
120142msgstr ""
143+ "成功時回傳物件 *o* 內之項目的串列,其中每個項目都是包含鍵值對的元組。失敗時回"
144+ "傳 ``NULL``。"
121145
122146#: ../../c-api/mapping.rst:23
123147msgid "built-in function"