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

Commitc0dd037

Browse files
authored
Merge branch '3.12' into cron/sync/3.12
2 parents629b63d +bff0132 commitc0dd037

File tree

4 files changed

+139
-126
lines changed

4 files changed

+139
-126
lines changed

‎c-api/iterator.po

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,19 @@ msgid ""
3131
"value, calling the callable for each item in the sequence, and ending the "
3232
"iteration when the sentinel value is returned."
3333
msgstr""
34-
"Python 提供了兩種通用的疊代器 (Iterator) 物件,第一種是序列 (sequence)。疊代"
35-
"器能夠與有支援 :meth:`~object.__getitem__`方法的任意序列使用,第二種是與可呼"
36-
" (callable) 物件和哨兵值 (sentinel value) 一起使用,會呼叫序列中的每個可呼"
37-
"叫物件,當回傳哨兵值時就結束疊代。"
34+
"Python 提供了兩種通用的疊代器 (iterator) 物件,第一種是序列疊代器 (sequence"
35+
"iterator),適用於支援 :meth:`~object.__getitem__`方法的任意序列,第二種是與"
36+
"可呼叫 (callable) 物件和哨兵值 (sentinel value) 一起使用,會呼叫序列中的每個"
37+
"可呼叫物件,當回傳哨兵值時就結束疊代。"
3838

3939
#:../../c-api/iterator.rst:17
4040
msgid""
4141
"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the "
4242
"one-argument form of the :func:`iter` built-in function for built-in "
4343
"sequence types."
4444
msgstr""
45+
"此型別物件用於由 :c:func:`PySeqIter_New` 所回傳的疊代器物件以及用於內建序列型"
46+
"別的內建函式 :func:`iter` 的單引數形式。"
4547

4648
#:../../c-api/iterator.rst:24
4749
msgid""

‎library/io.po

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgstr ""
77
"Project-Id-Version:Python 3.12\n"
88
"Report-Msgid-Bugs-To:\n"
99
"POT-Creation-Date:2023-08-30 00:04+0000\n"
10-
"PO-Revision-Date:2023-11-22 00:45+0800\n"
10+
"PO-Revision-Date:2023-12-08 00:08+0800\n"
1111
"Last-Translator:Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1313
"tw)\n"
@@ -417,6 +417,9 @@ msgid ""
417417
"used to specify the various categories of streams, then concrete classes "
418418
"providing the standard stream implementations."
419419
msgstr""
420+
"I/O 串流的實作是由多個類別組合成的階層結構所構成。首先是 :term:`abstract "
421+
"base classes <abstract base class>` (抽象基底類別,ABCs),它們被用來規範各"
422+
"種不同類型的串流,接著具體類別會提供標準串流的實作。"
420423

421424
#:../../library/io.rst:258
422425
msgid""
@@ -425,6 +428,9 @@ msgid ""
425428
"example, :class:`BufferedIOBase` provides unoptimized implementations of :"
426429
"meth:`!readinto` and :meth:`!readline`."
427430
msgstr""
431+
"為了協助具體串流類別的實作,抽象基底類別提供了某些方法的預設實作。舉例來說,:"
432+
"class:`BufferedIOBase` 提供未經最佳化的 :meth:`!readinto` 與 :meth:`!"
433+
"readline` 實作。"
428434

429435
#:../../library/io.rst:263
430436
msgid""
@@ -434,13 +440,19 @@ msgid ""
434440
"allowed to raise :exc:`UnsupportedOperation` if they do not support a given "
435441
"operation."
436442
msgstr""
443+
"I/O 階層結構的最上層是抽象基底類別 :class:`IOBase`。它定義了串流的基礎的介"
444+
"面。然而,請注意,讀取串流與寫入串流之間並沒有分離;若不支援給定的操作,實作"
445+
"是允許引發 :exc:`UnsupportedOperation` 例外的。"
437446

438447
#:../../library/io.rst:268
439448
msgid""
440449
"The :class:`RawIOBase` ABC extends :class:`IOBase`. It deals with the "
441450
"reading and writing of bytes to a stream. :class:`FileIO` subclasses :class:"
442451
"`RawIOBase` to provide an interface to files in the machine's file system."
443452
msgstr""
453+
"抽象基底類別 :class:`RawIOBase` 繼承 :class:`IOBase`。此類別處理對串流的位元"
454+
"組讀寫。:class:`FileIO` 則繼承 :class:`RawIOBase` 來提供一個介面以存取機器檔"
455+
"案系統內的檔案。"
444456

445457
#:../../library/io.rst:272
446458
msgid""
@@ -452,6 +464,12 @@ msgid ""
452464
"interface to seekable streams. Another :class:`BufferedIOBase` subclass, :"
453465
"class:`BytesIO`, is a stream of in-memory bytes."
454466
msgstr""
467+
"抽象基底類別 :class:`BufferedIOBase` 繼承 :class:`IOBase`。此類別緩衝原始二進"
468+
"位串流 (:class:`RawIOBase`)。它的子類別 :class:`BufferedWriter`、:class:"
469+
"`BufferedReader` 與 :class:`BufferedRWPair` 分別緩衝可寫、可讀、可讀也可寫的"
470+
"的原始二進位串流。類別 :class:`BufferedRandom` 則提供一個對可搜尋串流 "
471+
"(seekable stream) 的緩衝介面。另一個類別 :class:`BufferedIOBase` 的子類別 :"
472+
"class:`BytesIO`,是一個記憶體內位元組串流。"
455473

456474
#:../../library/io.rst:280
457475
msgid""
@@ -461,6 +479,10 @@ msgid ""
461479
"buffered text interface to a buffered raw stream (:class:`BufferedIOBase`). "
462480
"Finally, :class:`StringIO` is an in-memory stream for text."
463481
msgstr""
482+
"抽象基底類別 :class:`TextIOBase` 繼承 :class:`IOBase`。此類別處理文本位元組串"
483+
"流,並處理字串的編碼和解碼。類別 :class:`TextIOWrapper` 繼承自 :class:"
484+
"`TextIOBase`,這是個對緩衝原始串流 (:class:`BufferedIOBase`) 的緩衝文本介面。"
485+
"最後,:class:`StringIO` 是個文字記憶體內串流。"
464486

465487
#:../../library/io.rst:286
466488
msgid""
@@ -471,23 +493,23 @@ msgstr "引數名稱不是規範的一部份,只有 :func:`open` 的引數將
471493
#:../../library/io.rst:289
472494
msgid""
473495
"The following table summarizes the ABCs provided by the :mod:`io` module:"
474-
msgstr"以下表格總結了 :mod:`io`模組提供的抽象基礎類別 (ABC):"
496+
msgstr"以下表格總結了 :mod:`io`模組提供的抽象基底類別 (ABC):"
475497

476498
#:../../library/io.rst:294
477499
msgid"ABC"
478-
msgstr"ABC"
500+
msgstr"抽象基底類別 (ABC)"
479501

480502
#:../../library/io.rst:294
481503
msgid"Inherits"
482-
msgstr""
504+
msgstr"繼承"
483505

484506
#:../../library/io.rst:294
485507
msgid"Stub Methods"
486-
msgstr""
508+
msgstr"Stub 方法"
487509

488510
#:../../library/io.rst:294
489511
msgid"Mixin Methods and Properties"
490-
msgstr""
512+
msgstr"Mixin 方法與屬性"
491513

492514
#:../../library/io.rst:296../../library/io.rst:301../../library/io.rst:303
493515
#:../../library/io.rst:305
@@ -504,6 +526,9 @@ msgid ""
504526
"``__iter__``, ``__next__``, ``readable``, ``readline``, ``readlines``, "
505527
"``seekable``, ``tell``, ``writable``, and ``writelines``"
506528
msgstr""
529+
"``close``、``closed``、``__enter__``、``__exit__``、``flush``、``isatty``、"
530+
"``__iter__``、``__next__``、``readable``、``readline``、``readlines``、"
531+
"``seekable``、``tell``、``writable`` 與 ``writelines``"
507532

508533
#:../../library/io.rst:301
509534
msgid":class:`RawIOBase`"
@@ -515,7 +540,7 @@ msgstr "``readinto`` 和 ``write``"
515540

516541
#:../../library/io.rst:301
517542
msgid"Inherited :class:`IOBase` methods, ``read``, and ``readall``"
518-
msgstr""
543+
msgstr"繼承自 :class:`IOBase` 的方法,``read`` 與 ``readall``"
519544

520545
#:../../library/io.rst:303
521546
msgid":class:`BufferedIOBase`"
@@ -527,7 +552,7 @@ msgstr "``detach``\\ 、\\ ``read``\\ 、\\ ``read1`` 和 ``write``"
527552

528553
#:../../library/io.rst:303
529554
msgid"Inherited :class:`IOBase` methods, ``readinto``, and ``readinto1``"
530-
msgstr""
555+
msgstr"繼承自 :class:`IOBase` 的方法,``readinto`` 與 ``readinto1``"
531556

532557
#:../../library/io.rst:305
533558
msgid":class:`TextIOBase`"
@@ -541,21 +566,24 @@ msgstr "``detach``\\ 、\\ ``read``\\ 、\\ ``readline`` 和 ``write``"
541566
msgid""
542567
"Inherited :class:`IOBase` methods, ``encoding``, ``errors``, and ``newlines``"
543568
msgstr""
569+
"繼承自 :class:`IOBase` 的方法,``encoding``、``errors`` 與 ``newlines``"
544570

545571
#:../../library/io.rst:312
546572
msgid"I/O Base Classes"
547-
msgstr""
573+
msgstr"I/O 基礎類別"
548574

549575
#:../../library/io.rst:316
550576
msgid"The abstract base class for all I/O classes."
551-
msgstr""
577+
msgstr"所有 I/O 類別的抽象基礎類別。"
552578

553579
#:../../library/io.rst:318
554580
msgid""
555581
"This class provides empty abstract implementations for many methods that "
556582
"derived classes can override selectively; the default implementations "
557583
"represent a file that cannot be read, written or seeked."
558584
msgstr""
585+
"為許多方法提供了空的抽象實作,衍生類別可以選擇性地覆寫這些方法;預設的實作代"
586+
"表一個無法讀取、寫入或搜尋的檔案。"
559587

560588
#:../../library/io.rst:323
561589
msgid""

‎library/pathlib.po

Lines changed: 24 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2023, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
@@ -119,9 +118,7 @@ msgid ""
119118
"creates either a :class:`PurePosixPath` or a :class:`PureWindowsPath`)::"
120119
msgstr""
121120
"一個通用的類別,表示系統的路徑類型(實例化時會建立一個 :class:"
122-
"`PurePosixPath` 或 :class:`PureWindowsPath`):\n"
123-
"\n"
124-
"::"
121+
"`PurePosixPath` 或 :class:`PureWindowsPath`): ::"
125122

126123
#:../../library/pathlib.rst:108
127124
msgid""
@@ -132,36 +129,27 @@ msgid ""
132129
msgstr""
133130
"*pathsegments* 中的每個元素可以是以下的其中一種:一個表示路徑片段的字串或實作"
134131
"了 :class:`os.PathLike` 介面 (interface) 且 :meth:`~os.PathLike.__fspath__` "
135-
"方法會回傳字串的物件,像是另一個路徑物件:\n"
136-
"\n"
137-
"::"
132+
"方法會回傳字串的物件,像是另一個路徑物件: ::"
138133

139134
#:../../library/pathlib.rst:118
140135
msgid"When *pathsegments* is empty, the current directory is assumed::"
141-
msgstr""
142-
"當 *pathsegments* 是空的時候,預設使用目前的目錄:\n"
143-
"\n"
144-
"::"
136+
msgstr"當 *pathsegments* 是空的時候,預設使用目前的目錄: ::"
145137

146138
#:../../library/pathlib.rst:123
147139
msgid""
148140
"If a segment is an absolute path, all previous segments are ignored (like :"
149141
"func:`os.path.join`)::"
150142
msgstr""
151143
"如果一個片段是絕對路徑,則所有先前的片段將被忽略(類似於 :func:`os.path."
152-
"join`):\n"
153-
"\n"
154-
"::"
144+
"join`): ::"
155145

156146
#:../../library/pathlib.rst:131
157147
msgid""
158148
"On Windows, the drive is not reset when a rooted relative path segment (e."
159149
"g., ``r'\\foo'``) is encountered::"
160150
msgstr""
161151
"在 Windows 系統上,當遇到具有根目錄的相對路徑片段(例如 ``r'\\foo'``)時,磁"
162-
"碟機 (drive) 部分不會被重置:\n"
163-
"\n"
164-
"::"
152+
"碟機 (drive) 部分不會被重置: ::"
165153

166154
#:../../library/pathlib.rst:137
167155
msgid""
@@ -171,9 +159,7 @@ msgid ""
171159
msgstr""
172160
"不必要的斜線和單點會被合併,但雙點 (``'..'``) 和前置的雙斜線 (``'//'``) 不會"
173161
"被合併,因為這樣會因為各種原因改變路徑的意義(例如符號連結 (symbolic links)、"
174-
"UNC 路徑):\n"
175-
"\n"
176-
"::"
162+
"UNC 路徑): ::"
177163

178164
#:../../library/pathlib.rst:150
179165
msgid""
@@ -202,9 +188,7 @@ msgid ""
202188
"filesystem paths::"
203189
msgstr""
204190
":class:`PurePath` 的一個子類別 (subclass),該路徑類型表示非 Windows 檔案系統"
205-
"的路徑:\n"
206-
"\n"
207-
"::"
191+
"的路徑: ::"
208192

209193
#:../../library/pathlib.rst:168../../library/pathlib.rst:180
210194
#:../../library/pathlib.rst:742../../library/pathlib.rst:752
@@ -218,9 +202,7 @@ msgid ""
218202
"filesystem paths, including `UNC paths`_::"
219203
msgstr""
220204
":class:`PurePath` 的一個子類別,該路徑類型表示 Windows 檔案系統的路徑,包括 "
221-
"`UNC paths`_:\n"
222-
"\n"
223-
"::"
205+
"`UNC paths`_: ::"
224206

225207
#:../../library/pathlib.rst:184
226208
msgid""
@@ -307,27 +289,29 @@ msgstr ""
307289

308290
#:../../library/pathlib.rst:287
309291
msgid"Methods and properties"
310-
msgstr""
292+
msgstr"方法 (Method) 與特性 (Property)"
311293

312294
#:../../library/pathlib.rst:293
313295
msgid"Pure paths provide the following methods and properties:"
314-
msgstr""
296+
msgstr"純路徑提供以下方法與特性:"
315297

316298
#:../../library/pathlib.rst:297
317299
msgid"A string representing the drive letter or name, if any::"
318300
msgstr""
301+
"若存在則為一個表示磁碟機字母 (drive letter) 或磁碟機名稱 (drive name) 的字"
302+
"串: ::"
319303

320304
#:../../library/pathlib.rst:306
321305
msgid"UNC shares are also considered drives::"
322-
msgstr""
306+
msgstr"UNC shares 也被視為磁碟機: ::"
323307

324308
#:../../library/pathlib.rst:313
325309
msgid"A string representing the (local or global) root, if any::"
326-
msgstr""
310+
msgstr"若存在則為一個表示(局部或全域)根目錄的字串: ::"
327311

328312
#:../../library/pathlib.rst:322
329313
msgid"UNC shares always have a root::"
330-
msgstr""
314+
msgstr"UNC shares 都會有一個根目錄: ::"
331315

332316
#:../../library/pathlib.rst:327
333317
msgid""
@@ -976,17 +960,11 @@ msgstr ""
976960

977961
#:../../library/pathlib.rst:1204
978962
msgid"Return the binary contents of the pointed-to file as a bytes object::"
979-
msgstr""
980-
"將指向檔案的二進為內容以一個位元組 (bytes) 物件回傳:\n"
981-
"\n"
982-
"::"
963+
msgstr"將指向檔案的二進為內容以一個位元組 (bytes) 物件回傳: ::"
983964

984965
#:../../library/pathlib.rst:1217
985966
msgid"Return the decoded contents of the pointed-to file as a string::"
986-
msgstr""
987-
"將指向檔案的解碼內容以字串形式回傳:\n"
988-
"\n"
989-
"::"
967+
msgstr"將指向檔案的解碼內容以字串形式回傳: ::"
990968

991969
#:../../library/pathlib.rst:1225
992970
msgid""
@@ -998,10 +976,7 @@ msgstr "該檔案被打開並且隨後關閉。選填參數的含義與 :func:`o
998976
msgid""
999977
"Return the path to which the symbolic link points (as returned by :func:`os."
1000978
"readlink`)::"
1001-
msgstr""
1002-
"回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值):\n"
1003-
"\n"
1004-
"::"
979+
msgstr"回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值): ::"
1005980

1006981
#:../../library/pathlib.rst:1246
1007982
msgid""
@@ -1014,9 +989,7 @@ msgstr ""
1014989
"將此檔案或目錄重新命名為所提供的 *target* ,並回傳一個新的路徑 (Path) 物件指"
1015990
"向該 *target* 。在 Unix 系統上,若 *target* 存在且為一個檔案,若使用者有權"
1016991
"限,則會在不顯示訊息的情況下進行取代。在 Windows 系統上,若 *target* 存在,則"
1017-
"會引發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件:\n"
1018-
"\n"
1019-
"::"
992+
"會引發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件: ::"
1020993

1021994
#:../../library/pathlib.rst:1261../../library/pathlib.rst:1277
1022995
msgid""
@@ -1051,27 +1024,19 @@ msgid ""
10511024
"Make the path absolute, without normalization or resolving symlinks. Returns "
10521025
"a new path object::"
10531026
msgstr""
1054-
"使路徑成為絕對路徑,不進行標準化或解析符號連結。 回傳一個新的路徑物件:\n"
1055-
"\n"
1056-
"::"
1027+
"使路徑成為絕對路徑,不進行標準化或解析符號連結。 回傳一個新的路徑物件: ::"
10571028

10581029
#:../../library/pathlib.rst:1299
10591030
msgid""
10601031
"Make the path absolute, resolving any symlinks. A new path object is "
10611032
"returned::"
1062-
msgstr""
1063-
"將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件:\n"
1064-
"\n"
1065-
"::"
1033+
msgstr"將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件: ::"
10661034

10671035
#:../../library/pathlib.rst:1308
10681036
msgid""
10691037
"\"``..``\" components are also eliminated (this is the only method to do "
10701038
"so)::"
1071-
msgstr""
1072-
"同時也會消除\"``..``\" 的路徑組件(這是唯一的方法):\n"
1073-
"\n"
1074-
"::"
1039+
msgstr"同時也會消除\"``..``\" 的路徑組件(這是唯一的方法): ::"
10751040

10761041
#:../../library/pathlib.rst:1314
10771042
msgid""
@@ -1098,9 +1063,7 @@ msgid ""
10981063
msgstr""
10991064
"遞迴地 glob 給定的相對 *pattern*。這相當於在給定的相對 *pattern* 前面加上 "
11001065
"\"``**/``\" 並呼叫 :func:`Path.glob`,其中 *patterns* 和 :mod:`fnmatch` 相"
1101-
"同:\n"
1102-
"\n"
1103-
"::"
1066+
"同: ::"
11041067

11051068
#:../../library/pathlib.rst:1341
11061069
msgid""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp