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

Commitcca299f

Browse files
sync with cpython f2cc0052
1 parente82ea00 commitcca299f

File tree

5 files changed

+691
-727
lines changed

5 files changed

+691
-727
lines changed

‎faq/design.po

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version:Python 3.12\n"
1010
"Report-Msgid-Bugs-To:\n"
11-
"POT-Creation-Date:2023-07-17 17:39+0800\n"
11+
"POT-Creation-Date:2023-08-21 00:03+0000\n"
1212
"PO-Revision-Date:2023-02-18 13:10+0800\n"
1313
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1414
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1021,13 +1021,14 @@ msgstr ""
10211021
"用來建構詳盡徹底的測試套件來測試模組裡的每一行程式碼。"
10221022

10231023
#:../../faq/design.rst:584
1024+
#,fuzzy
10241025
msgid""
10251026
"An appropriate testing discipline can help build large complex applications "
10261027
"in Python as well as having interface specifications would. In fact, it can "
10271028
"be better because an interface specification cannot test certain properties "
1028-
"of a program. For example, the :meth:`list.append` method is expected to "
1029+
"of a program. For example, the :meth:`!list.append` method is expected to "
10291030
"add new elements to the end of some internal list; an interface "
1030-
"specification cannot test that your :meth:`list.append` implementation will "
1031+
"specification cannot test that your :meth:`!list.append` implementation will "
10311032
"actually do this correctly, but it's trivial to check this property in a "
10321033
"test suite."
10331034
msgstr""

‎faq/library.po

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version:Python 3.12\n"
1111
"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"
1313
"PO-Revision-Date:2023-02-18 13:22+0800\n"
1414
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1515
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -222,7 +222,7 @@ msgstr "Python 中是否有等同於 C 的 onexit() 的函式?"
222222
#,fuzzy
223223
msgid""
224224
"The :mod:`atexit` module provides a register function that is similar to "
225-
"C's :c:func:`onexit`."
225+
"C's :c:func:`!onexit`."
226226
msgstr""
227227
":mod:`atexit` 模組提供了一個類似於 C 的 :c:func:`onexit` 的寄存器函式。"
228228

@@ -554,9 +554,9 @@ msgstr ""
554554
#,fuzzy
555555
msgid""
556556
"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+
"canaffect things. This is especially true for the mass updates to "
559+
"dictionariesand lists. When in doubt, use a mutex!"
560560
msgstr""
561561
"替換其他物件的操作可能會在引用計數達到零時呼叫其他物件的 :meth:`__del__` 方"
562562
"法,這可能會影響事情。對於字典和列表的大量更新尤其如此。如有疑問,請使用互斥"
@@ -1031,32 +1031,33 @@ msgstr ":mod:`select` 模組通常用於幫助處理 socket 上的非同步 I/O
10311031
#,fuzzy
10321032
msgid""
10331033
"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."
10391040
msgstr""
10401041
"為防止 TCP 連接阻塞,可以將 socket 設定為非阻塞模式。然後當你執行 :meth:"
10411042
"`socket.connect` 時,你要麼立即連接(不太可能),要麼得到一個例外,其中包含錯"
10421043
"誤號 ``.errno``。 ``errno.EINPROGRESS`` 表示連接正在進行中,但尚未完成。不同"
10431044
"的作業系統將回傳不同的值,因此你將不得不檢查系統回傳的內容。"
10441045

1045-
#:../../faq/library.rst:774
1046+
#:../../faq/library.rst:775
10461047
#,fuzzy
10471048
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+
"anexception. 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+
"indicatethat you're connected -- or you can pass this socket to :meth:"
1053+
"`select.select` to check if it's writable."
10531054
msgstr""
10541055
"你可以使用 :meth:`socket.connect_ex` 方法來避免建立例外。它只會回傳 errno "
10551056
"值。要輪詢,你可以稍後再次呼叫:meth:`socket.connect_ex` - ``0`` 或 ``errno."
10561057
"EISCONN`` 表示你已連接 - 或者你可以將此 socket 傳遞給:meth:` select."
10571058
"select` 檢查它是否可寫。"
10581059

1059-
#:../../faq/library.rst:780
1060+
#:../../faq/library.rst:783
10601061
msgid""
10611062
"The :mod:`asyncio` module provides a general purpose single-threaded and "
10621063
"concurrent asynchronous library, which can be used for writing non-blocking "
@@ -1067,19 +1068,19 @@ msgstr ""
10671068
"網路程式碼。第三方 `Twisted <https://twisted.org/>`_ 函式庫是一種流行且功能豐"
10681069
"富的替代方案。"
10691070

1070-
#:../../faq/library.rst:788
1071+
#:../../faq/library.rst:791
10711072
msgid"Databases"
10721073
msgstr"資料庫"
10731074

1074-
#:../../faq/library.rst:791
1075+
#:../../faq/library.rst:794
10751076
msgid"Are there any interfaces to database packages in Python?"
10761077
msgstr"Python 中是否有任何資料庫套件的介面?"
10771078

1078-
#:../../faq/library.rst:793
1079+
#:../../faq/library.rst:796
10791080
msgid"Yes."
10801081
msgstr"有的。"
10811082

1082-
#:../../faq/library.rst:795
1083+
#:../../faq/library.rst:798
10831084
#,fuzzy
10841085
msgid""
10851086
"Interfaces to disk-based hashes such as :mod:`DBM <dbm.ndbm>` and :mod:`GDBM "
@@ -1091,7 +1092,7 @@ msgstr ""
10911092
"含在標準 Python 中。還有 :mod:`sqlite3` 模組,它提供了一個輕量級的基於磁盤的"
10921093
"關係資料庫。"
10931094

1094-
#:../../faq/library.rst:800
1095+
#:../../faq/library.rst:803
10951096
#,fuzzy
10961097
msgid""
10971098
"Support for most relational databases is available. See the "
@@ -1101,12 +1102,12 @@ msgstr ""
11011102
"支援大多數關係資料庫。有關詳細資訊,請參閱`DatabaseProgramming 維基頁面 "
11021103
"<https://wiki.python.org/moin/DatabaseProgramming>`_。"
11031104

1104-
#:../../faq/library.rst:806
1105+
#:../../faq/library.rst:809
11051106
#,fuzzy
11061107
msgid"How do you implement persistent objects in Python?"
11071108
msgstr"你如何在 Python 中實作持久物件?"
11081109

1109-
#:../../faq/library.rst:808
1110+
#:../../faq/library.rst:811
11101111
#,fuzzy
11111112
msgid""
11121113
"The :mod:`pickle` library module solves this in a very general way (though "
@@ -1118,15 +1119,15 @@ msgstr ""
11181119
"如打開的檔案、socket 或窗口之類的東西),而 :mod:`shelve` 庫模組使用 pickle "
11191120
"和 (g) dbm 建立包含任意 Python 物件的持久映射。"
11201121

1121-
#:../../faq/library.rst:815
1122+
#:../../faq/library.rst:818
11221123
msgid"Mathematics and Numerics"
11231124
msgstr"數學和數值"
11241125

1125-
#:../../faq/library.rst:818
1126+
#:../../faq/library.rst:821
11261127
msgid"How do I generate random numbers in Python?"
11271128
msgstr"如何在 Python 中生成隨機數?"
11281129

1129-
#:../../faq/library.rst:820
1130+
#:../../faq/library.rst:823
11301131
msgid""
11311132
"The standard module :mod:`random` implements a random number generator. "
11321133
"Usage is simple::"
@@ -1135,41 +1136,41 @@ msgstr ""
11351136
"\n"
11361137
"::"
11371138

1138-
#:../../faq/library.rst:826
1139+
#:../../faq/library.rst:829
11391140
msgid"This returns a random floating point number in the range [0, 1)."
11401141
msgstr"這將回傳 [0, 1) 範圍內的隨機浮點數。"
11411142

1142-
#:../../faq/library.rst:828
1143+
#:../../faq/library.rst:831
11431144
msgid""
11441145
"There are also many other specialized generators in this module, such as:"
11451146
msgstr"該模組中還有許多其他專用生成器,例如:"
11461147

1147-
#:../../faq/library.rst:830
1148+
#:../../faq/library.rst:833
11481149
msgid"``randrange(a, b)`` chooses an integer in the range [a, b)."
11491150
msgstr"``randrange(a, b)`` 會選擇 [a, b) 範圍內的一個整數。"
11501151

1151-
#:../../faq/library.rst:831
1152+
#:../../faq/library.rst:834
11521153
msgid"``uniform(a, b)`` chooses a floating point number in the range [a, b)."
11531154
msgstr"``uniform(a, b)`` 會選擇 [a, b) 範圍內的浮點數。"
11541155

1155-
#:../../faq/library.rst:832
1156+
#:../../faq/library.rst:835
11561157
msgid""
11571158
"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution."
11581159
msgstr"``normalvariate(mean, sdev)`` 對常態(高斯)分佈進行採樣 (sample)。"
11591160

1160-
#:../../faq/library.rst:834
1161+
#:../../faq/library.rst:837
11611162
msgid"Some higher-level functions operate on sequences directly, such as:"
11621163
msgstr"一些更高階的函式會直接對序列進行操作,例如:"
11631164

1164-
#:../../faq/library.rst:836
1165+
#:../../faq/library.rst:839
11651166
msgid"``choice(S)`` chooses a random element from a given sequence."
11661167
msgstr"``choice(S)`` 會從給定序列中選擇一個隨機元素。"
11671168

1168-
#:../../faq/library.rst:837
1169+
#:../../faq/library.rst:840
11691170
msgid"``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly."
11701171
msgstr"``shuffle(L)`` 會原地 (in-place) 打亂 list,即隨機排列它。"
11711172

1172-
#:../../faq/library.rst:839
1173+
#:../../faq/library.rst:842
11731174
msgid""
11741175
"There's also a ``Random`` class you can instantiate to create independent "
11751176
"multiple random number generators."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp