Skip to content

Commit b08e12e

Browse files
committed
Deploy preview for PR 1193 🛫
1 parent 16be1c9 commit b08e12e

File tree

585 files changed

+3169
-3749
lines changed

Some content is hidden

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

585 files changed

+3169
-3749
lines changed

pr-preview/pr-1193/_sources/library/stdtypes.rst.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2504,6 +2504,19 @@ expression support in the :mod:`re` module).
25042504
done using the specified *fillchar* (default is an ASCII space). The
25052505
original string is returned if *width* is less than or equal to ``len(s)``.
25062506

2507+
For example:
2508+
2509+
.. doctest::
2510+
2511+
>>> 'Python'.rjust(10)
2512+
' Python'
2513+
>>> 'Python'.rjust(10, '.')
2514+
'....Python'
2515+
>>> 'Monty Python'.rjust(10, '.')
2516+
'Monty Python'
2517+
2518+
See also :meth:`ljust` and :meth:`zfill`.
2519+
25072520

25082521
.. method:: str.rpartition(sep, /)
25092522

@@ -2820,13 +2833,17 @@ expression support in the :mod:`re` module).
28202833
than before. The original string is returned if *width* is less than
28212834
or equal to ``len(s)``.
28222835

2823-
For example::
2836+
For example:
2837+
2838+
.. doctest::
28242839

28252840
>>> "42".zfill(5)
28262841
'00042'
28272842
>>> "-42".zfill(5)
28282843
'-0042'
28292844

2845+
See also :meth:`rjust`.
2846+
28302847

28312848
.. index::
28322849
single: ! formatted string literal

pr-preview/pr-1193/_sources/library/typing.rst.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3347,8 +3347,8 @@ Introspection helpers
33473347

33483348
.. function:: get_type_hints(obj, globalns=None, localns=None, include_extras=False)
33493349

3350-
Return a dictionary containing type hints for a function, method, module
3351-
or class object.
3350+
Return a dictionary containing type hints for a function, method, module,
3351+
class object, or other callable object.
33523352

33533353
This is often the same as ``obj.__annotations__``, but this function makes
33543354
the following changes to the annotations dictionary:
@@ -3389,6 +3389,13 @@ Introspection helpers
33893389
:ref:`type aliases <type-aliases>` that include forward references,
33903390
or with names imported under :data:`if TYPE_CHECKING <TYPE_CHECKING>`.
33913391

3392+
.. note::
3393+
3394+
Calling :func:`get_type_hints` on an instance is not supported.
3395+
To retrieve annotations for an instance, call
3396+
:func:`get_type_hints` on the instance's class instead
3397+
(for example, ``get_type_hints(type(obj))``).
3398+
33923399
.. versionchanged:: 3.9
33933400
Added ``include_extras`` parameter as part of :pep:`593`.
33943401
See the documentation on :data:`Annotated` for more information.
@@ -3398,6 +3405,11 @@ Introspection helpers
33983405
if a default value equal to ``None`` was set.
33993406
Now the annotation is returned unchanged.
34003407

3408+
.. versionchanged:: 3.14
3409+
Calling :func:`get_type_hints` on instances is no longer supported.
3410+
Some instances were accepted in earlier versions as an undocumented
3411+
implementation detail.
3412+
34013413
.. function:: get_origin(tp)
34023414

34033415
Get the unsubscripted version of a type: for a typing object of the form

pr-preview/pr-1193/_static/glossary.json

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

pr-preview/pr-1193/about.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ <h4>下個主題</h4>
124124
<h3>此頁面</h3>
125125
<ul class="this-page-menu">
126126
<li><a href="bugs.html">回報錯誤</a></li>
127-
<li><a class="improvepage" href="improve-page-nojs.html">Improve this page</a></li>
127+
<li><a class="improvepage" href="improve-page-nojs.html">改進此頁面</a></li>
128128
<li>
129129
<a href="https://github.com/python/cpython/blob/main/Doc/about.rst?plain=1"
130130
rel="nofollow">顯示原始碼
@@ -264,7 +264,7 @@ <h4>下個主題</h4>
264264
<h3>此頁面</h3>
265265
<ul class="this-page-menu">
266266
<li><a href="bugs.html">回報錯誤</a></li>
267-
<li><a class="improvepage" href="improve-page-nojs.html">Improve this page</a></li>
267+
<li><a class="improvepage" href="improve-page-nojs.html">改進此頁面</a></li>
268268
<li>
269269
<a href="https://github.com/python/cpython/blob/main/Doc/about.rst?plain=1"
270270
rel="nofollow">顯示原始碼
@@ -356,7 +356,7 @@ <h3>導航</h3>
356356
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
357357
<br>
358358
<br>
359-
最後更新於 2月 26, 2026 (00:24 UTC)。
359+
最後更新於 2月 26, 2026 (18:25 UTC)。
360360

361361
<a href="/bugs.html">發現 bug</a>
362362

pr-preview/pr-1193/bugs.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h4>下個主題</h4>
126126
<h3>此頁面</h3>
127127
<ul class="this-page-menu">
128128
<li><a href="#">回報錯誤</a></li>
129-
<li><a class="improvepage" href="improve-page-nojs.html">Improve this page</a></li>
129+
<li><a class="improvepage" href="improve-page-nojs.html">改進此頁面</a></li>
130130
<li>
131131
<a href="https://github.com/python/cpython/blob/main/Doc/bugs.rst?plain=1"
132132
rel="nofollow">顯示原始碼
@@ -207,9 +207,7 @@ <h3>導航</h3>
207207
<section id="dealing-with-bugs">
208208
<span id="reporting-bugs"></span><h1>處理錯誤 (Bug)<a class="headerlink" href="#dealing-with-bugs" title="連結到這個標頭"></a></h1>
209209
<p>Python 已經是一個以穩定著稱的成熟程式語言。為了維持「穩定」的信譽,開發者們想知道任何你在 Python 中發現的缺失。</p>
210-
<p>It can be sometimes faster to fix bugs yourself and contribute patches to
211-
Python as it streamlines the process and involves fewer people. Learn how to
212-
<a class="reference internal" href="#contributing-to-python"><span class="std std-ref">contribute</span></a>.</p>
210+
<p>有時候自己直接修復錯誤並且送出一個修正給 Python 會比較快,因為這樣會加速流程而且不會困擾到太多人。學習如何<a class="reference internal" href="#contributing-to-python"><span class="std std-ref">貢獻給 Python</span></a></p>
213211
<section id="documentation-bugs">
214212
<h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title="連結到這個標頭"></a></h2>
215213
<p>如果你在這份說明文件中發現了錯誤並想要提出改進方案,請將錯誤報告提交到<a class="reference internal" href="#using-the-tracker"><span class="std std-ref">錯誤追蹤系統 (issue tracker)</span></a>。如果你有相應的修正建議,請一併提交。(譯者註:如果是繁體中文說明文件翻譯相關的錯誤,請提交到 <a class="reference external" href="https://github.com/python/python-docs-zh-tw/issues">https://github.com/python/python-docs-zh-tw/issues</a>。)</p>
@@ -252,7 +250,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
252250
</section>
253251
<section id="getting-started-contributing-to-python-yourself">
254252
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
255-
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://devguide.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
253+
<p>除了只是回報你所發現的錯誤之外,同樣也歡迎你提交修正它們的修補程式 (patch)。你可以在 <a class="reference external" href="https://devguide.python.org/">Python 開發者指南</a>中找到如何開始修補 Python 的更多資訊。如果你有任何問題,<a class="reference external" href="https://mail.python.org/mailman3/lists/core-mentorship.python.org/">核心導師郵寄清單</a>是一個友善的地方,你可以在那裡得到,關於 Python 修正錯誤的過程中,所有問題的答案。</p>
256254
</section>
257255
</section>
258256

@@ -303,7 +301,7 @@ <h4>下個主題</h4>
303301
<h3>此頁面</h3>
304302
<ul class="this-page-menu">
305303
<li><a href="#">回報錯誤</a></li>
306-
<li><a class="improvepage" href="improve-page-nojs.html">Improve this page</a></li>
304+
<li><a class="improvepage" href="improve-page-nojs.html">改進此頁面</a></li>
307305
<li>
308306
<a href="https://github.com/python/cpython/blob/main/Doc/bugs.rst?plain=1"
309307
rel="nofollow">顯示原始碼
@@ -395,7 +393,7 @@ <h3>導航</h3>
395393
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
396394
<br>
397395
<br>
398-
最後更新於 2月 26, 2026 (00:24 UTC)。
396+
最後更新於 2月 26, 2026 (18:25 UTC)。
399397

400398
<a href="/bugs.html">發現 bug</a>
401399

pr-preview/pr-1193/c-api/abstract.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h4>下個主題</h4>
114114
<h3>此頁面</h3>
115115
<ul class="this-page-menu">
116116
<li><a href="../bugs.html">回報錯誤</a></li>
117-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
117+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
118118
<li>
119119
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/abstract.rst?plain=1"
120120
rel="nofollow">顯示原始碼
@@ -162,7 +162,7 @@ <h3>導航</h3>
162162
<a href="../index.html">3.14.3 Documentation</a> &#187;
163163
</li>
164164

165-
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python/C API reference manual</a> &#187;</li>
165+
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python/C API 參考手冊</a> &#187;</li>
166166
<li class="nav-item nav-item-this"><a href="">抽象物件層 (Abstract Objects Layer)</a></li>
167167
<li class="right">
168168

@@ -272,7 +272,7 @@ <h4>下個主題</h4>
272272
<h3>此頁面</h3>
273273
<ul class="this-page-menu">
274274
<li><a href="../bugs.html">回報錯誤</a></li>
275-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
275+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
276276
<li>
277277
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/abstract.rst?plain=1"
278278
rel="nofollow">顯示原始碼
@@ -323,7 +323,7 @@ <h3>導航</h3>
323323
<a href="../index.html">3.14.3 Documentation</a> &#187;
324324
</li>
325325

326-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
326+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
327327
<li class="nav-item nav-item-this"><a href="">抽象物件層 (Abstract Objects Layer)</a></li>
328328
<li class="right">
329329

@@ -365,7 +365,7 @@ <h3>導航</h3>
365365
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
366366
<br>
367367
<br>
368-
最後更新於 2月 26, 2026 (00:24 UTC)。
368+
最後更新於 2月 26, 2026 (18:25 UTC)。
369369

370370
<a href="/bugs.html">發現 bug</a>
371371

pr-preview/pr-1193/c-api/allocation.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ <h4>下個主題</h4>
124124
<h3>此頁面</h3>
125125
<ul class="this-page-menu">
126126
<li><a href="../bugs.html">回報錯誤</a></li>
127-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
127+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
128128
<li>
129129
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/allocation.rst?plain=1"
130130
rel="nofollow">顯示原始碼
@@ -172,7 +172,7 @@ <h3>導航</h3>
172172
<a href="../index.html">3.14.3 Documentation</a> &#187;
173173
</li>
174174

175-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
175+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
176176
<li class="nav-item nav-item-2"><a href="objimpl.html" accesskey="U">物件實作支援</a> &#187;</li>
177177
<li class="nav-item nav-item-this"><a href="">在 heap 上分配物件</a></li>
178178
<li class="right">
@@ -480,7 +480,7 @@ <h4>下個主題</h4>
480480
<h3>此頁面</h3>
481481
<ul class="this-page-menu">
482482
<li><a href="../bugs.html">回報錯誤</a></li>
483-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
483+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
484484
<li>
485485
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/allocation.rst?plain=1"
486486
rel="nofollow">顯示原始碼
@@ -531,7 +531,7 @@ <h3>導航</h3>
531531
<a href="../index.html">3.14.3 Documentation</a> &#187;
532532
</li>
533533

534-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
534+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
535535
<li class="nav-item nav-item-2"><a href="objimpl.html" >物件實作支援</a> &#187;</li>
536536
<li class="nav-item nav-item-this"><a href="">在 heap 上分配物件</a></li>
537537
<li class="right">
@@ -574,7 +574,7 @@ <h3>導航</h3>
574574
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
575575
<br>
576576
<br>
577-
最後更新於 2月 26, 2026 (00:24 UTC)。
577+
最後更新於 2月 26, 2026 (18:25 UTC)。
578578

579579
<a href="/bugs.html">發現 bug</a>
580580

pr-preview/pr-1193/c-api/apiabiversion.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ <h4>下個主題</h4>
126126
<h3>此頁面</h3>
127127
<ul class="this-page-menu">
128128
<li><a href="../bugs.html">回報錯誤</a></li>
129-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
129+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
130130
<li>
131131
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/apiabiversion.rst?plain=1"
132132
rel="nofollow">顯示原始碼
@@ -174,7 +174,7 @@ <h3>導航</h3>
174174
<a href="../index.html">3.14.3 Documentation</a> &#187;
175175
</li>
176176

177-
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python/C API reference manual</a> &#187;</li>
177+
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Python/C API 參考手冊</a> &#187;</li>
178178
<li class="nav-item nav-item-this"><a href="">API 和 ABI 版本管理</a></li>
179179
<li class="right">
180180

@@ -421,7 +421,7 @@ <h4>下個主題</h4>
421421
<h3>此頁面</h3>
422422
<ul class="this-page-menu">
423423
<li><a href="../bugs.html">回報錯誤</a></li>
424-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
424+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
425425
<li>
426426
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/apiabiversion.rst?plain=1"
427427
rel="nofollow">顯示原始碼
@@ -472,7 +472,7 @@ <h3>導航</h3>
472472
<a href="../index.html">3.14.3 Documentation</a> &#187;
473473
</li>
474474

475-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
475+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
476476
<li class="nav-item nav-item-this"><a href="">API 和 ABI 版本管理</a></li>
477477
<li class="right">
478478

@@ -514,7 +514,7 @@ <h3>導航</h3>
514514
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
515515
<br>
516516
<br>
517-
最後更新於 2月 26, 2026 (00:24 UTC)。
517+
最後更新於 2月 26, 2026 (18:25 UTC)。
518518

519519
<a href="/bugs.html">發現 bug</a>
520520

pr-preview/pr-1193/c-api/arg.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ <h4>下個主題</h4>
131131
<h3>此頁面</h3>
132132
<ul class="this-page-menu">
133133
<li><a href="../bugs.html">回報錯誤</a></li>
134-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
134+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
135135
<li>
136136
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/arg.rst?plain=1"
137137
rel="nofollow">顯示原始碼
@@ -179,7 +179,7 @@ <h3>導航</h3>
179179
<a href="../index.html">3.14.3 Documentation</a> &#187;
180180
</li>
181181

182-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
182+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
183183
<li class="nav-item nav-item-2"><a href="utilities.html" accesskey="U">工具</a> &#187;</li>
184184
<li class="nav-item nav-item-this"><a href="">剖析引數與建置數值</a></li>
185185
<li class="right">
@@ -902,7 +902,7 @@ <h4>下個主題</h4>
902902
<h3>此頁面</h3>
903903
<ul class="this-page-menu">
904904
<li><a href="../bugs.html">回報錯誤</a></li>
905-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
905+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
906906
<li>
907907
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/arg.rst?plain=1"
908908
rel="nofollow">顯示原始碼
@@ -953,7 +953,7 @@ <h3>導航</h3>
953953
<a href="../index.html">3.14.3 Documentation</a> &#187;
954954
</li>
955955

956-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
956+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
957957
<li class="nav-item nav-item-2"><a href="utilities.html" >工具</a> &#187;</li>
958958
<li class="nav-item nav-item-this"><a href="">剖析引數與建置數值</a></li>
959959
<li class="right">
@@ -996,7 +996,7 @@ <h3>導航</h3>
996996
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
997997
<br>
998998
<br>
999-
最後更新於 2月 26, 2026 (00:24 UTC)。
999+
最後更新於 2月 26, 2026 (18:25 UTC)。
10001000

10011001
<a href="/bugs.html">發現 bug</a>
10021002

pr-preview/pr-1193/c-api/bool.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h4>下個主題</h4>
114114
<h3>此頁面</h3>
115115
<ul class="this-page-menu">
116116
<li><a href="../bugs.html">回報錯誤</a></li>
117-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
117+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
118118
<li>
119119
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/bool.rst?plain=1"
120120
rel="nofollow">顯示原始碼
@@ -162,7 +162,7 @@ <h3>導航</h3>
162162
<a href="../index.html">3.14.3 Documentation</a> &#187;
163163
</li>
164164

165-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
165+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
166166
<li class="nav-item nav-item-2"><a href="concrete.html" accesskey="U">具體物件層</a> &#187;</li>
167167
<li class="nav-item nav-item-this"><a href="">Boolean(布林)物件</a></li>
168168
<li class="right">
@@ -282,7 +282,7 @@ <h4>下個主題</h4>
282282
<h3>此頁面</h3>
283283
<ul class="this-page-menu">
284284
<li><a href="../bugs.html">回報錯誤</a></li>
285-
<li><a class="improvepage" href="../improve-page-nojs.html">Improve this page</a></li>
285+
<li><a class="improvepage" href="../improve-page-nojs.html">改進此頁面</a></li>
286286
<li>
287287
<a href="https://github.com/python/cpython/blob/main/Doc/c-api/bool.rst?plain=1"
288288
rel="nofollow">顯示原始碼
@@ -333,7 +333,7 @@ <h3>導航</h3>
333333
<a href="../index.html">3.14.3 Documentation</a> &#187;
334334
</li>
335335

336-
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API reference manual</a> &#187;</li>
336+
<li class="nav-item nav-item-1"><a href="index.html" >Python/C API 參考手冊</a> &#187;</li>
337337
<li class="nav-item nav-item-2"><a href="concrete.html" >具體物件層</a> &#187;</li>
338338
<li class="nav-item nav-item-this"><a href="">Boolean(布林)物件</a></li>
339339
<li class="right">
@@ -376,7 +376,7 @@ <h3>導航</h3>
376376
<a href="https://www.python.org/psf/donations/">敬請捐贈。</a>
377377
<br>
378378
<br>
379-
最後更新於 2月 26, 2026 (00:24 UTC)。
379+
最後更新於 2月 26, 2026 (18:25 UTC)。
380380

381381
<a href="/bugs.html">發現 bug</a>
382382

0 commit comments

Comments
 (0)