Skip to content

Commit 2d73557

Browse files
committed
Deploy preview for PR 1249 🛫
1 parent a776169 commit 2d73557

602 files changed

Lines changed: 2266 additions & 2827 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎pr-preview/pr-1249/_static/glossary.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎pr-preview/pr-1249/about.html‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,7 @@ <h1>關於這份說明文件<a class="headerlink" href="#about-this-documentatio
214214
</ul>
215215
<section id="contributors-to-the-python-documentation">
216216
<h2>Python 文件的貢獻者們<a class="headerlink" href="#contributors-to-the-python-documentation" title="連結到這個標頭"></a></h2>
217-
<p>Many people have contributed to the Python language, the Python standard
218-
library, and the Python documentation. See the <a class="reference external" href="https://github.com/python/cpython/graphs/contributors">CPython
219-
GitHub repository</a>
220-
for a partial list of contributors.</p>
217+
<p>許多人都曾為 Python 這門語言、Python 標準函式庫和 Python 說明文件貢獻過。部份貢獻者的清單請見 <a class="reference external" href="https://github.com/python/cpython/graphs/contributors">CPython GitHub 儲存庫</a>。</p>
221218
<p>正因為 Python 社群的撰寫與貢獻才有這份這麼棒的說明文件 -- 感謝所有貢獻過的人們!</p>
222219
</section>
223220
</section>
@@ -359,7 +356,7 @@ <h3>導航</h3>
359356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
360357
<br>
361358
<br>
362-
最後更新於 10月 15, 2026 (20:28 UTC)。
359+
最後更新於 10月 15, 2026 (20:42 UTC)。
363360

364361
<a href="/bugs.html">發現 bug</a>?
365362

‎pr-preview/pr-1249/bugs.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ <h3>導航</h3>
223223
</dd>
224224
<dt><a class="reference external" href="https://devguide.python.org/docquality/#helping-with-documentation">貢獻說明文件</a></dt><dd><p>給有意成為 Python 說明文件貢獻者的綜合指南。</p>
225225
</dd>
226-
<dt><a class="reference external" href="https://devguide.python.org/documentation/translations/translating/#translation-coordinators">Documentation Translations</a></dt><dd><p>A list of GitHub pages for documentation translation and their coordination teams.</p>
226+
<dt><a class="reference external" href="https://devguide.python.org/documentation/translations/translating/#translation-coordinators">Documentation Translations</a></dt><dd><p>一份 GitHub 網頁的清單,裡面有各個說明文件翻譯團隊的連結,以及他們的協調團隊。</p>
227227
</dd>
228228
</dl>
229229
</div>
@@ -393,7 +393,7 @@ <h3>導航</h3>
393393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
394394
<br>
395395
<br>
396-
最後更新於 10月 15, 2026 (20:28 UTC)。
396+
最後更新於 10月 15, 2026 (20:42 UTC)。
397397

398398
<a href="/bugs.html">發現 bug</a>?
399399

‎pr-preview/pr-1249/builtins/constants.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ <h3>導航</h3>
433433
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
434434
<br>
435435
<br>
436-
最後更新於 10月 15, 2026 (20:28 UTC)。
436+
最後更新於 10月 15, 2026 (20:42 UTC)。
437437

438438
<a href="/bugs.html">發現 bug</a>?
439439

‎pr-preview/pr-1249/builtins/exceptions.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ <h3>導航</h3>
13081308
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
13091309
<br>
13101310
<br>
1311-
最後更新於 10月 15, 2026 (20:28 UTC)。
1311+
最後更新於 10月 15, 2026 (20:42 UTC)。
13121312

13131313
<a href="/bugs.html">發現 bug</a>?
13141314

‎pr-preview/pr-1249/builtins/functions.html‎

Lines changed: 12 additions & 47 deletions
Large diffs are not rendered by default.

‎pr-preview/pr-1249/builtins/index.html‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ <h3>導航</h3>
216216
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#comparisons">比較運算</a></li>
217217
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#numeric-types-int-float-complex">數值型別 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>、<code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>、<code class="xref py py-class docutils literal notranslate"><span class="pre">complex</span></code></a></li>
218218
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#boolean-type-bool">Boolean 型別 - <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></li>
219-
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#iteration-related-types">Iteration-related types</a></li>
219+
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#iteration-related-types">與疊代相關的型別</a></li>
220220
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#sequence-types-list-tuple-range">Sequence Types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">list</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">range</span></code></a></li>
221221
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#text-and-binary-sequence-type-methods-summary">Text and Binary Sequence Type Methods Summary</a></li>
222222
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#text-sequence-type-str">Text Sequence Type --- <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a></li>
223223
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#binary-sequence-types-bytes-bytearray-memoryview">Binary Sequence Types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">bytes</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">bytearray</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">memoryview</span></code></a></li>
224224
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#set-types-set-frozenset">Set Types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">set</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozenset</span></code></a></li>
225-
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#mapping-types-dict-frozendict">Mapping types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a></li>
225+
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#mapping-types-dict-frozendict">對映型別 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>、<code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a></li>
226226
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#context-manager-types">情境管理器型別</a></li>
227227
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#type-annotation-types-generic-alias-union">型別註釋的型別 --- <span class="xref std std-ref">泛型別名 (Generic Alias)</span>、<span class="xref std std-ref">聯合 (Union)</span></a></li>
228228
<li class="toctree-l2"><a class="reference internal" href="stdtypes.html#other-built-in-types">其他內建型別</a></li>
@@ -396,7 +396,7 @@ <h3>導航</h3>
396396
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
397397
<br>
398398
<br>
399-
最後更新於 10月 15, 2026 (20:28 UTC)。
399+
最後更新於 10月 15, 2026 (20:42 UTC)。
400400

401401
<a href="/bugs.html">發現 bug</a>?
402402

‎pr-preview/pr-1249/builtins/stdtypes.html‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ <h3><a href="../contents.html">目錄</a></h3>
102102
</ul>
103103
</li>
104104
<li><a class="reference internal" href="#boolean-type-bool">Boolean 型別 - <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></li>
105-
<li><a class="reference internal" href="#iteration-related-types">Iteration-related types</a><ul>
106-
<li><a class="reference internal" href="#iterables">Iterables</a></li>
107-
<li><a class="reference internal" href="#iterators">Iterators</a></li>
108-
<li><a class="reference internal" href="#generator-types">Generator types</a><ul>
109-
<li><a class="reference internal" href="#generator-iterators">Generator iterators</a></li>
105+
<li><a class="reference internal" href="#iteration-related-types">與疊代相關的型別</a><ul>
106+
<li><a class="reference internal" href="#iterables">可疊代物件</a></li>
107+
<li><a class="reference internal" href="#iterators">疊代器</a></li>
108+
<li><a class="reference internal" href="#generator-types">產生器型別</a><ul>
109+
<li><a class="reference internal" href="#generator-iterators">產生器疊代器</a></li>
110110
<li><a class="reference internal" href="#asynchronous-generator-iterators">Asynchronous generator iterators</a></li>
111111
</ul>
112112
</li>
@@ -143,9 +143,9 @@ <h3><a href="../contents.html">目錄</a></h3>
143143
</ul>
144144
</li>
145145
<li><a class="reference internal" href="#set-types-set-frozenset">Set Types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">set</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozenset</span></code></a></li>
146-
<li><a class="reference internal" href="#mapping-types-dict-frozendict">Mapping types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a><ul>
146+
<li><a class="reference internal" href="#mapping-types-dict-frozendict">對映型別 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>、<code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a><ul>
147147
<li><a class="reference internal" href="#dictionary-view-objects">字典視圖物件</a></li>
148-
<li><a class="reference internal" href="#frozen-dictionaries">Frozen dictionaries</a></li>
148+
<li><a class="reference internal" href="#frozen-dictionaries">凍結字典</a></li>
149149
</ul>
150150
</li>
151151
<li><a class="reference internal" href="#context-manager-types">情境管理器型別</a></li>
@@ -894,10 +894,10 @@ <h3>複數的附加方法<a class="headerlink" href="#additional-methods-on-comp
894894
<p><a class="reference internal" href="functions.html#bool" title="bool"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a> 是 <a class="reference internal" href="functions.html#int" title="int"><code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code></a> 的子類別(見<a class="reference internal" href="#typesnumeric"><span class="std std-ref">數值型別 --- int、float、complex</span></a>)。在許多數值情境中,<code class="docutils literal notranslate"><span class="pre">False</span></code> 和 <code class="docutils literal notranslate"><span class="pre">True</span></code> 分別像整數 0 和 1 一樣。然而,不鼓勵依賴這一點;請使用 <a class="reference internal" href="functions.html#int" title="int"><code class="xref py py-func docutils literal notranslate"><span class="pre">int()</span></code></a> 進行顯式轉換。</p>
895895
</section>
896896
<section id="iteration-related-types">
897-
<span id="typeiter"></span><span id="iterator-types"></span><h2>Iteration-related types<a class="headerlink" href="#iteration-related-types" title="連結到這個標頭">¶</a></h2>
897+
<span id="typeiter"></span><span id="iterator-types"></span><h2>與疊代相關的型別<a class="headerlink" href="#iteration-related-types" title="連結到這個標頭">¶</a></h2>
898898
<p id="index-18">Python 支援對容器的疊代概念。這是實作兩種不同的 methods;這些方法被用於允許使用者定義的 classes 以支援疊代。序列則總是支援這些疊代 methods,在下方有更詳細的描述。</p>
899899
<section id="iterables">
900-
<h3>Iterables<a class="headerlink" href="#iterables" title="連結到這個標頭">¶</a></h3>
900+
<h3>可疊代物件<a class="headerlink" href="#iterables" title="連結到這個標頭">¶</a></h3>
901901
<p>需要為容器物件定義一個 method 來提供<a class="reference internal" href="../glossary.html#term-iterable"><span class="xref std std-term">可疊代物件</span></a>支援:</p>
902902
<dl class="py method">
903903
<dt class="sig sig-object py" id="container.__iter__">
@@ -907,7 +907,7 @@ <h3>Iterables<a class="headerlink" href="#iterables" title="連結到這個標
907907

908908
</section>
909909
<section id="iterators">
910-
<span id="stdtypes-iterators"></span><h3>Iterators<a class="headerlink" href="#iterators" title="連結到這個標頭">¶</a></h3>
910+
<span id="stdtypes-iterators"></span><h3>疊代器<a class="headerlink" href="#iterators" title="連結到這個標頭">¶</a></h3>
911911
<p>疊代器物件本身需要支援下列兩個 methods,他們一起形成了 <em class="dfn">疊代器協定</em>:</p>
912912
<dl class="py method">
913913
<dt class="sig sig-object py" id="iterator.__iter__">
@@ -925,7 +925,7 @@ <h3>Iterables<a class="headerlink" href="#iterables" title="連結到這個標
925925
<p>一旦疊代器的 <a class="reference internal" href="#iterator.__next__" title="iterator.__next__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__next__()</span></code></a> method 引發 <a class="reference internal" href="exceptions.html#StopIteration" title="StopIteration"><code class="xref py py-exc docutils literal notranslate"><span class="pre">StopIteration</span></code></a>,則它必須在後續呼叫中繼續這樣做。不遵守此屬性的實作被認為是有問題的。</p>
926926
</section>
927927
<section id="generator-types">
928-
<span id="id3"></span><h3>Generator types<a class="headerlink" href="#generator-types" title="連結到這個標頭">¶</a></h3>
928+
<span id="id3"></span><h3>產生器型別<a class="headerlink" href="#generator-types" title="連結到這個標頭">¶</a></h3>
929929
<p>Python's <a class="reference internal" href="../glossary.html#term-generator"><span class="xref std std-term">generators</span></a> -- or more precisely,
930930
<a class="reference internal" href="../glossary.html#term-generator-function"><span class="xref std std-term">generator functions</span></a> and
931931
<a class="reference internal" href="../glossary.html#term-generator-iterator"><span class="xref std std-term">generator iterators</span></a> -- provide a convenient way
@@ -974,7 +974,7 @@ <h3>Iterables<a class="headerlink" href="#iterables" title="連結到這個標
974974
</pre></div>
975975
</div>
976976
<section id="generator-iterators">
977-
<span id="generator-methods"></span><span id="index-19"></span><h4>Generator iterators<a class="headerlink" href="#generator-iterators" title="連結到這個標頭">¶</a></h4>
977+
<span id="generator-methods"></span><span id="index-19"></span><h4>產生器疊代器<a class="headerlink" href="#generator-iterators" title="連結到這個標頭">¶</a></h4>
978978
<p>Generator iterators implement the
979979
<a class="reference internal" href="#stdtypes-iterators"><span class="std std-ref">iterator protocol</span></a>.
980980
Iterating them drives execution of the underlying generator function.</p>
@@ -5561,7 +5561,7 @@ <h4>Format specifier<a class="headerlink" href="#format-specifier" title="連結
55615561
</div>
55625562
</section>
55635563
<section id="mapping-types-dict-frozendict">
5564-
<span id="typesmapping"></span><h2>Mapping types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code><a class="headerlink" href="#mapping-types-dict-frozendict" title="連結到這個標頭">¶</a></h2>
5564+
<span id="typesmapping"></span><h2>對映型別 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>、<code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code><a class="headerlink" href="#mapping-types-dict-frozendict" title="連結到這個標頭">¶</a></h2>
55655565
<p id="index-59">A <a class="reference internal" href="../glossary.html#term-mapping"><span class="xref std std-term">mapping</span></a> object maps <a class="reference internal" href="../glossary.html#term-hashable"><span class="xref std std-term">hashable</span></a> values to arbitrary objects.
55665566
There are currently two standard mapping types, the <em class="dfn">dictionary</em> and
55675567
<a class="reference internal" href="#frozendict" title="frozendict"><code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a>.
@@ -5999,7 +5999,7 @@ <h4>Format specifier<a class="headerlink" href="#format-specifier" title="連結
59995999
</div>
60006000
</section>
60016001
<section id="frozen-dictionaries">
6002-
<h3>Frozen dictionaries<a class="headerlink" href="#frozen-dictionaries" title="連結到這個標頭">¶</a></h3>
6002+
<h3>凍結字典<a class="headerlink" href="#frozen-dictionaries" title="連結到這個標頭">¶</a></h3>
60036003
<dl class="py class">
60046004
<dt class="sig sig-object py" id="frozendict">
60056005
<em class="property"><span class="k"><span class="pre">class</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">frozendict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#frozendict" title="連結到這個定義">¶</a></dt>
@@ -6791,11 +6791,11 @@ <h3><a href="../contents.html">目錄</a></h3>
67916791
</ul>
67926792
</li>
67936793
<li><a class="reference internal" href="#boolean-type-bool">Boolean 型別 - <code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a></li>
6794-
<li><a class="reference internal" href="#iteration-related-types">Iteration-related types</a><ul>
6795-
<li><a class="reference internal" href="#iterables">Iterables</a></li>
6796-
<li><a class="reference internal" href="#iterators">Iterators</a></li>
6797-
<li><a class="reference internal" href="#generator-types">Generator types</a><ul>
6798-
<li><a class="reference internal" href="#generator-iterators">Generator iterators</a></li>
6794+
<li><a class="reference internal" href="#iteration-related-types">與疊代相關的型別</a><ul>
6795+
<li><a class="reference internal" href="#iterables">可疊代物件</a></li>
6796+
<li><a class="reference internal" href="#iterators">疊代器</a></li>
6797+
<li><a class="reference internal" href="#generator-types">產生器型別</a><ul>
6798+
<li><a class="reference internal" href="#generator-iterators">產生器疊代器</a></li>
67996799
<li><a class="reference internal" href="#asynchronous-generator-iterators">Asynchronous generator iterators</a></li>
68006800
</ul>
68016801
</li>
@@ -6832,9 +6832,9 @@ <h3><a href="../contents.html">目錄</a></h3>
68326832
</ul>
68336833
</li>
68346834
<li><a class="reference internal" href="#set-types-set-frozenset">Set Types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">set</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozenset</span></code></a></li>
6835-
<li><a class="reference internal" href="#mapping-types-dict-frozendict">Mapping types --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a><ul>
6835+
<li><a class="reference internal" href="#mapping-types-dict-frozendict">對映型別 --- <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code>、<code class="xref py py-class docutils literal notranslate"><span class="pre">frozendict</span></code></a><ul>
68366836
<li><a class="reference internal" href="#dictionary-view-objects">字典視圖物件</a></li>
6837-
<li><a class="reference internal" href="#frozen-dictionaries">Frozen dictionaries</a></li>
6837+
<li><a class="reference internal" href="#frozen-dictionaries">凍結字典</a></li>
68386838
</ul>
68396839
</li>
68406840
<li><a class="reference internal" href="#context-manager-types">情境管理器型別</a></li>
@@ -6993,7 +6993,7 @@ <h3>導航</h3>
69936993
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
69946994
<br>
69956995
<br>
6996-
最後更新於 10月 15, 2026 (20:28 UTC)。
6996+
最後更新於 10月 15, 2026 (20:42 UTC)。
69976997

69986998
<a href="/bugs.html">發現 bug</a>?
69996999

‎pr-preview/pr-1249/builtins/threadsafety.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ <h3>導航</h3>
814814
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
815815
<br>
816816
<br>
817-
最後更新於 10月 15, 2026 (20:28 UTC)。
817+
最後更新於 10月 15, 2026 (20:42 UTC)。
818818

819819
<a href="/bugs.html">發現 bug</a>?
820820

0 commit comments

Comments
 (0)