9
9
msgstr ""
10
10
"Project-Id-Version :Python 3.12\n "
11
11
"Report-Msgid-Bugs-To :\n "
12
- "POT-Creation-Date :2023-04-24 00:16 +0000\n "
12
+ "POT-Creation-Date :2023-08-21 00:03 +0000\n "
13
13
"PO-Revision-Date :2023-02-18 13:22+0800\n "
14
14
"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
15
15
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -222,7 +222,7 @@ msgstr "Python 中是否有等同於 C 的 onexit() 的函式?"
222
222
#, fuzzy
223
223
msgid ""
224
224
"The :mod:`atexit` module provides a register function that is similar to "
225
- "C's :c:func:`onexit`."
225
+ "C's :c:func:`! onexit`."
226
226
msgstr ""
227
227
":mod:`atexit` 模組提供了一個類似於 C 的 :c:func:`onexit` 的寄存器函式。"
228
228
@@ -554,9 +554,9 @@ msgstr ""
554
554
#, fuzzy
555
555
msgid ""
556
556
"Operations that replace other objects may invoke those other objects' :meth:"
557
- "`__del__` method when their reference count reaches zero, and that can "
558
- "affect things. This is especially true for the mass updates to dictionaries "
559
- "and lists. When in doubt, use a mutex!"
557
+ "`~object. __del__` method when their reference count reaches zero, and that "
558
+ "can affect things. This is especially true for the mass updates to "
559
+ "dictionaries and lists. When in doubt, use a mutex!"
560
560
msgstr ""
561
561
"替換其他物件的操作可能會在引用計數達到零時呼叫其他物件的 :meth:`__del__` 方"
562
562
"法,這可能會影響事情。對於字典和列表的大量更新尤其如此。如有疑問,請使用互斥"
@@ -1031,32 +1031,33 @@ msgstr ":mod:`select` 模組通常用於幫助處理 socket 上的非同步 I/O
1031
1031
#, fuzzy
1032
1032
msgid ""
1033
1033
"To prevent the TCP connect from blocking, you can set the socket to non-"
1034
- "blocking mode. Then when you do the :meth:`socket.connect`, you will either "
1035
- "connect immediately (unlikely) or get an exception that contains the error "
1036
- "number as ``.errno``. ``errno.EINPROGRESS`` indicates that the connection is "
1037
- "in progress, but hasn't finished yet. Different OSes will return different "
1038
- "values, so you're going to have to check what's returned on your system."
1034
+ "blocking mode. Then when you do the :meth:`~socket.socket.connect`, you "
1035
+ "will either connect immediately (unlikely) or get an exception that contains "
1036
+ "the error number as ``.errno``. ``errno.EINPROGRESS`` indicates that the "
1037
+ "connection is in progress, but hasn't finished yet. Different OSes will "
1038
+ "return different values, so you're going to have to check what's returned on "
1039
+ "your system."
1039
1040
msgstr ""
1040
1041
"為防止 TCP 連接阻塞,可以將 socket 設定為非阻塞模式。然後當你執行 :meth:"
1041
1042
"`socket.connect` 時,你要麼立即連接(不太可能),要麼得到一個例外,其中包含錯"
1042
1043
"誤號 ``.errno``。 ``errno.EINPROGRESS`` 表示連接正在進行中,但尚未完成。不同"
1043
1044
"的作業系統將回傳不同的值,因此你將不得不檢查系統回傳的內容。"
1044
1045
1045
- #: ../../faq/library.rst:774
1046
+ #: ../../faq/library.rst:775
1046
1047
#, fuzzy
1047
1048
msgid ""
1048
- "You can use the :meth:`socket.connect_ex` method to avoid creating an "
1049
- "exception. It will just return the errno value. To poll, you can call :"
1050
- "meth:`socket.connect_ex` again later -- ``0`` or ``errno.EISCONN`` indicate "
1051
- "that you're connected -- or you can pass this socket to :meth:`select. "
1052
- "select` to check if it's writable."
1049
+ "You can use the :meth:`~ socket.socket. connect_ex` method to avoid creating "
1050
+ "an exception. It will just return the errno value. To poll, you can call :"
1051
+ "meth:`~ socket.socket. connect_ex` again later -- ``0`` or ``errno.EISCONN`` "
1052
+ "indicate that you're connected -- or you can pass this socket to :meth:"
1053
+ "`select. select` to check if it's writable."
1053
1054
msgstr ""
1054
1055
"你可以使用 :meth:`socket.connect_ex` 方法來避免建立例外。它只會回傳 errno "
1055
1056
"值。要輪詢,你可以稍後再次呼叫:meth:`socket.connect_ex` - ``0`` 或 ``errno."
1056
1057
"EISCONN`` 表示你已連接 - 或者你可以將此 socket 傳遞給:meth:` select."
1057
1058
"select` 檢查它是否可寫。"
1058
1059
1059
- #: ../../faq/library.rst:780
1060
+ #: ../../faq/library.rst:783
1060
1061
msgid ""
1061
1062
"The :mod:`asyncio` module provides a general purpose single-threaded and "
1062
1063
"concurrent asynchronous library, which can be used for writing non-blocking "
@@ -1067,19 +1068,19 @@ msgstr ""
1067
1068
"網路程式碼。第三方 `Twisted <https://twisted.org/>`_ 函式庫是一種流行且功能豐"
1068
1069
"富的替代方案。"
1069
1070
1070
- #: ../../faq/library.rst:788
1071
+ #: ../../faq/library.rst:791
1071
1072
msgid "Databases"
1072
1073
msgstr "資料庫"
1073
1074
1074
- #: ../../faq/library.rst:791
1075
+ #: ../../faq/library.rst:794
1075
1076
msgid "Are there any interfaces to database packages in Python?"
1076
1077
msgstr "Python 中是否有任何資料庫套件的介面?"
1077
1078
1078
- #: ../../faq/library.rst:793
1079
+ #: ../../faq/library.rst:796
1079
1080
msgid "Yes."
1080
1081
msgstr "有的。"
1081
1082
1082
- #: ../../faq/library.rst:795
1083
+ #: ../../faq/library.rst:798
1083
1084
#, fuzzy
1084
1085
msgid ""
1085
1086
"Interfaces to disk-based hashes such as :mod:`DBM <dbm.ndbm>` and :mod:`GDBM "
@@ -1091,7 +1092,7 @@ msgstr ""
1091
1092
"含在標準 Python 中。還有 :mod:`sqlite3` 模組,它提供了一個輕量級的基於磁盤的"
1092
1093
"關係資料庫。"
1093
1094
1094
- #: ../../faq/library.rst:800
1095
+ #: ../../faq/library.rst:803
1095
1096
#, fuzzy
1096
1097
msgid ""
1097
1098
"Support for most relational databases is available. See the "
@@ -1101,12 +1102,12 @@ msgstr ""
1101
1102
"支援大多數關係資料庫。有關詳細資訊,請參閱`DatabaseProgramming 維基頁面 "
1102
1103
"<https://wiki.python.org/moin/DatabaseProgramming>`_。"
1103
1104
1104
- #: ../../faq/library.rst:806
1105
+ #: ../../faq/library.rst:809
1105
1106
#, fuzzy
1106
1107
msgid "How do you implement persistent objects in Python?"
1107
1108
msgstr "你如何在 Python 中實作持久物件?"
1108
1109
1109
- #: ../../faq/library.rst:808
1110
+ #: ../../faq/library.rst:811
1110
1111
#, fuzzy
1111
1112
msgid ""
1112
1113
"The :mod:`pickle` library module solves this in a very general way (though "
@@ -1118,15 +1119,15 @@ msgstr ""
1118
1119
"如打開的檔案、socket 或窗口之類的東西),而 :mod:`shelve` 庫模組使用 pickle "
1119
1120
"和 (g) dbm 建立包含任意 Python 物件的持久映射。"
1120
1121
1121
- #: ../../faq/library.rst:815
1122
+ #: ../../faq/library.rst:818
1122
1123
msgid "Mathematics and Numerics"
1123
1124
msgstr "數學和數值"
1124
1125
1125
- #: ../../faq/library.rst:818
1126
+ #: ../../faq/library.rst:821
1126
1127
msgid "How do I generate random numbers in Python?"
1127
1128
msgstr "如何在 Python 中生成隨機數?"
1128
1129
1129
- #: ../../faq/library.rst:820
1130
+ #: ../../faq/library.rst:823
1130
1131
msgid ""
1131
1132
"The standard module :mod:`random` implements a random number generator. "
1132
1133
"Usage is simple::"
@@ -1135,41 +1136,41 @@ msgstr ""
1135
1136
"\n"
1136
1137
"::"
1137
1138
1138
- #: ../../faq/library.rst:826
1139
+ #: ../../faq/library.rst:829
1139
1140
msgid "This returns a random floating point number in the range [0, 1)."
1140
1141
msgstr "這將回傳 [0, 1) 範圍內的隨機浮點數。"
1141
1142
1142
- #: ../../faq/library.rst:828
1143
+ #: ../../faq/library.rst:831
1143
1144
msgid ""
1144
1145
"There are also many other specialized generators in this module, such as:"
1145
1146
msgstr "該模組中還有許多其他專用生成器,例如:"
1146
1147
1147
- #: ../../faq/library.rst:830
1148
+ #: ../../faq/library.rst:833
1148
1149
msgid "``randrange(a, b)`` chooses an integer in the range [a, b)."
1149
1150
msgstr "``randrange(a, b)`` 會選擇 [a, b) 範圍內的一個整數。"
1150
1151
1151
- #: ../../faq/library.rst:831
1152
+ #: ../../faq/library.rst:834
1152
1153
msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)."
1153
1154
msgstr "``uniform(a, b)`` 會選擇 [a, b) 範圍內的浮點數。"
1154
1155
1155
- #: ../../faq/library.rst:832
1156
+ #: ../../faq/library.rst:835
1156
1157
msgid ""
1157
1158
"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution."
1158
1159
msgstr "``normalvariate(mean, sdev)`` 對常態(高斯)分佈進行採樣 (sample)。"
1159
1160
1160
- #: ../../faq/library.rst:834
1161
+ #: ../../faq/library.rst:837
1161
1162
msgid "Some higher-level functions operate on sequences directly, such as:"
1162
1163
msgstr "一些更高階的函式會直接對序列進行操作,例如:"
1163
1164
1164
- #: ../../faq/library.rst:836
1165
+ #: ../../faq/library.rst:839
1165
1166
msgid "``choice(S)`` chooses a random element from a given sequence."
1166
1167
msgstr "``choice(S)`` 會從給定序列中選擇一個隨機元素。"
1167
1168
1168
- #: ../../faq/library.rst:837
1169
+ #: ../../faq/library.rst:840
1169
1170
msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly."
1170
1171
msgstr "``shuffle(L)`` 會原地 (in-place) 打亂 list,即隨機排列它。"
1171
1172
1172
- #: ../../faq/library.rst:839
1173
+ #: ../../faq/library.rst:842
1173
1174
msgid ""
1174
1175
"There's also a ``Random`` class you can instantiate to create independent "
1175
1176
"multiple random number generators."