Skip to content

Commit 5f10495

Browse files
committed
Deploying to gh-pages from @ f3042a1 🚀
1 parent 487d428 commit 5f10495

File tree

556 files changed

+1085
-1072
lines changed

Some content is hidden

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

556 files changed

+1085
-1072
lines changed

_sources/c-api/object.rst.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ Object Protocol
111111
.. note::
112112
113113
Exceptions that occur when this calls :meth:`~object.__getattr__` and
114-
:meth:`~object.__getattribute__` methods are silently ignored.
114+
:meth:`~object.__getattribute__` methods aren't propagated,
115+
but instead given to :func:`sys.unraisablehook`.
115116
For proper error handling, use :c:func:`PyObject_HasAttrWithError`,
116117
:c:func:`PyObject_GetOptionalAttr` or :c:func:`PyObject_GetAttr` instead.
117118

_sources/library/enum.rst.txt

+27-2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ Module Contents
110110
``KEEP`` which allows for more fine-grained control over how invalid values
111111
are dealt with in an enumeration.
112112

113+
:class:`EnumDict`
114+
115+
A subclass of :class:`dict` for use when subclassing :class:`EnumType`.
116+
113117
:class:`auto`
114118

115119
Instances are replaced with an appropriate value for Enum members.
@@ -152,6 +156,7 @@ Module Contents
152156

153157
.. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto``
154158
.. versionadded:: 3.11 ``StrEnum``, ``EnumCheck``, ``ReprEnum``, ``FlagBoundary``, ``property``, ``member``, ``nonmember``, ``global_enum``, ``show_flag_values``
159+
.. versionadded:: 3.13 ``EnumDict``
155160

156161
---------------
157162

@@ -821,7 +826,27 @@ Data Types
821826
>>> KeepFlag(2**2 + 2**4)
822827
<KeepFlag.BLUE|16: 20>
823828

824-
.. versionadded:: 3.11
829+
.. versionadded:: 3.11
830+
831+
.. class:: EnumDict
832+
833+
*EnumDict* is a subclass of :class:`dict` that is used as the namespace
834+
for defining enum classes (see :ref:`prepare`).
835+
It is exposed to allow subclasses of :class:`EnumType` with advanced
836+
behavior like having multiple values per member.
837+
It should be called with the name of the enum class being created, otherwise
838+
private names and internal classes will not be handled correctly.
839+
840+
Note that only the :class:`~collections.abc.MutableMapping` interface
841+
(:meth:`~object.__setitem__` and :meth:`~dict.update`) is overridden.
842+
It may be possible to bypass the checks using other :class:`!dict`
843+
operations like :meth:`|= <object.__ior__>`.
844+
845+
.. attribute:: EnumDict.member_names
846+
847+
A list of member names.
848+
849+
.. versionadded:: 3.13
825850

826851
---------------
827852

@@ -966,7 +991,6 @@ Utilities and Decorators
966991
Should only be used when the enum members are exported
967992
to the module global namespace (see :class:`re.RegexFlag` for an example).
968993

969-
970994
.. versionadded:: 3.11
971995

972996
.. function:: show_flag_values(value)
@@ -975,6 +999,7 @@ Utilities and Decorators
975999

9761000
.. versionadded:: 3.11
9771001

1002+
9781003
---------------
9791004

9801005
Notes

_sources/reference/compound_stmts.rst.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -534,15 +534,18 @@ is semantically equivalent to::
534534
enter = type(manager).__enter__
535535
exit = type(manager).__exit__
536536
value = enter(manager)
537+
hit_except = False
537538

538539
try:
539540
TARGET = value
540541
SUITE
541542
except:
543+
hit_except = True
542544
if not exit(manager, *sys.exc_info()):
543545
raise
544-
else:
545-
exit(manager, None, None, None)
546+
finally:
547+
if not hit_except:
548+
exit(manager, None, None, None)
546549

547550
With more than one item, the context managers are processed as if multiple
548551
:keyword:`with` statements were nested::

_sources/whatsnew/3.13.rst.txt

+7
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,13 @@ email
889889
the :cve:`2023-27043` fix.)
890890

891891

892+
enum
893+
----
894+
895+
* :class:`~enum.EnumDict` has been made public to better support subclassing
896+
:class:`~enum.EnumType`.
897+
898+
892899
fractions
893900
---------
894901

about.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ <h3>瀏覽</h3>
320320
<a href="https://www.python.org/psf/donations/">Please donate.</a>
321321
<br />
322322
<br />
323-
最後更新於 12月 23, 2024 (12:47 UTC)。
323+
最後更新於 12月 29, 2024 (16:06 UTC)。
324324

325325
<a href="/bugs.html">Found a bug</a>?
326326

bugs.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ <h2>說明文件的錯誤<a class="headerlink" href="#documentation-bugs" title=
231231
</section>
232232
<section id="getting-started-contributing-to-python-yourself">
233233
<span id="contributing-to-python"></span><h2>開始讓自己貢獻 Python<a class="headerlink" href="#getting-started-contributing-to-python-yourself" title="連結到這個標頭"></a></h2>
234-
<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>
234+
<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>
235235
</section>
236236
</section>
237237

@@ -359,7 +359,7 @@ <h3>瀏覽</h3>
359359
<a href="https://www.python.org/psf/donations/">Please donate.</a>
360360
<br />
361361
<br />
362-
最後更新於 12月 23, 2024 (12:47 UTC)。
362+
最後更新於 12月 29, 2024 (16:06 UTC)。
363363

364364
<a href="/bugs.html">Found a bug</a>?
365365

c-api/abstract.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ <h3>瀏覽</h3>
329329
<a href="https://www.python.org/psf/donations/">Please donate.</a>
330330
<br />
331331
<br />
332-
最後更新於 12月 23, 2024 (12:47 UTC)。
332+
最後更新於 12月 29, 2024 (16:06 UTC)。
333333

334334
<a href="/bugs.html">Found a bug</a>?
335335

c-api/allocation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ <h3>瀏覽</h3>
344344
<a href="https://www.python.org/psf/donations/">Please donate.</a>
345345
<br />
346346
<br />
347-
最後更新於 12月 23, 2024 (12:47 UTC)。
347+
最後更新於 12月 29, 2024 (16:06 UTC)。
348348

349349
<a href="/bugs.html">Found a bug</a>?
350350

c-api/apiabiversion.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ <h3>瀏覽</h3>
376376
<a href="https://www.python.org/psf/donations/">Please donate.</a>
377377
<br />
378378
<br />
379-
最後更新於 12月 23, 2024 (12:47 UTC)。
379+
最後更新於 12月 29, 2024 (16:06 UTC)。
380380

381381
<a href="/bugs.html">Found a bug</a>?
382382

c-api/arg.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ <h3>瀏覽</h3>
924924
<a href="https://www.python.org/psf/donations/">Please donate.</a>
925925
<br />
926926
<br />
927-
最後更新於 12月 23, 2024 (12:47 UTC)。
927+
最後更新於 12月 29, 2024 (16:06 UTC)。
928928

929929
<a href="/bugs.html">Found a bug</a>?
930930

c-api/bool.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h3>瀏覽</h3>
341341
<a href="https://www.python.org/psf/donations/">Please donate.</a>
342342
<br />
343343
<br />
344-
最後更新於 12月 23, 2024 (12:47 UTC)。
344+
最後更新於 12月 29, 2024 (16:06 UTC)。
345345

346346
<a href="/bugs.html">Found a bug</a>?
347347

c-api/buffer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ <h3>瀏覽</h3>
10161016
<a href="https://www.python.org/psf/donations/">Please donate.</a>
10171017
<br />
10181018
<br />
1019-
最後更新於 12月 23, 2024 (12:47 UTC)。
1019+
最後更新於 12月 29, 2024 (16:06 UTC)。
10201020

10211021
<a href="/bugs.html">Found a bug</a>?
10221022

c-api/bytearray.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ <h3>瀏覽</h3>
400400
<a href="https://www.python.org/psf/donations/">Please donate.</a>
401401
<br />
402402
<br />
403-
最後更新於 12月 23, 2024 (12:47 UTC)。
403+
最後更新於 12月 29, 2024 (16:06 UTC)。
404404

405405
<a href="/bugs.html">Found a bug</a>?
406406

c-api/bytes.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ <h3>瀏覽</h3>
521521
<a href="https://www.python.org/psf/donations/">Please donate.</a>
522522
<br />
523523
<br />
524-
最後更新於 12月 23, 2024 (12:47 UTC)。
524+
最後更新於 12月 29, 2024 (16:06 UTC)。
525525

526526
<a href="/bugs.html">Found a bug</a>?
527527

c-api/call.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ <h3>瀏覽</h3>
652652
<a href="https://www.python.org/psf/donations/">Please donate.</a>
653653
<br />
654654
<br />
655-
最後更新於 12月 23, 2024 (12:47 UTC)。
655+
最後更新於 12月 29, 2024 (16:06 UTC)。
656656

657657
<a href="/bugs.html">Found a bug</a>?
658658

c-api/capsule.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ <h3>瀏覽</h3>
441441
<a href="https://www.python.org/psf/donations/">Please donate.</a>
442442
<br />
443443
<br />
444-
最後更新於 12月 23, 2024 (12:47 UTC)。
444+
最後更新於 12月 29, 2024 (16:06 UTC)。
445445

446446
<a href="/bugs.html">Found a bug</a>?
447447

c-api/cell.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h3>瀏覽</h3>
341341
<a href="https://www.python.org/psf/donations/">Please donate.</a>
342342
<br />
343343
<br />
344-
最後更新於 12月 23, 2024 (12:47 UTC)。
344+
最後更新於 12月 29, 2024 (16:06 UTC)。
345345

346346
<a href="/bugs.html">Found a bug</a>?
347347

c-api/code.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ <h3>瀏覽</h3>
606606
<a href="https://www.python.org/psf/donations/">Please donate.</a>
607607
<br />
608608
<br />
609-
最後更新於 12月 23, 2024 (12:47 UTC)。
609+
最後更新於 12月 29, 2024 (16:06 UTC)。
610610

611611
<a href="/bugs.html">Found a bug</a>?
612612

c-api/codec.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ <h3>瀏覽</h3>
445445
<a href="https://www.python.org/psf/donations/">Please donate.</a>
446446
<br />
447447
<br />
448-
最後更新於 12月 23, 2024 (12:47 UTC)。
448+
最後更新於 12月 29, 2024 (16:06 UTC)。
449449

450450
<a href="/bugs.html">Found a bug</a>?
451451

c-api/complex.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ <h3>瀏覽</h3>
456456
<a href="https://www.python.org/psf/donations/">Please donate.</a>
457457
<br />
458458
<br />
459-
最後更新於 12月 23, 2024 (12:47 UTC)。
459+
最後更新於 12月 29, 2024 (16:06 UTC)。
460460

461461
<a href="/bugs.html">Found a bug</a>?
462462

c-api/concrete.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ <h3>瀏覽</h3>
465465
<a href="https://www.python.org/psf/donations/">Please donate.</a>
466466
<br />
467467
<br />
468-
最後更新於 12月 23, 2024 (12:47 UTC)。
468+
最後更新於 12月 29, 2024 (16:06 UTC)。
469469

470470
<a href="/bugs.html">Found a bug</a>?
471471

c-api/contextvars.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ <h3>瀏覽</h3>
451451
<a href="https://www.python.org/psf/donations/">Please donate.</a>
452452
<br />
453453
<br />
454-
最後更新於 12月 23, 2024 (12:47 UTC)。
454+
最後更新於 12月 29, 2024 (16:06 UTC)。
455455

456456
<a href="/bugs.html">Found a bug</a>?
457457

c-api/conversion.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ <h3>瀏覽</h3>
390390
<a href="https://www.python.org/psf/donations/">Please donate.</a>
391391
<br />
392392
<br />
393-
最後更新於 12月 23, 2024 (12:47 UTC)。
393+
最後更新於 12月 29, 2024 (16:06 UTC)。
394394

395395
<a href="/bugs.html">Found a bug</a>?
396396

c-api/coro.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ <h3>瀏覽</h3>
319319
<a href="https://www.python.org/psf/donations/">Please donate.</a>
320320
<br />
321321
<br />
322-
最後更新於 12月 23, 2024 (12:47 UTC)。
322+
最後更新於 12月 29, 2024 (16:06 UTC)。
323323

324324
<a href="/bugs.html">Found a bug</a>?
325325

c-api/datetime.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ <h3>瀏覽</h3>
630630
<a href="https://www.python.org/psf/donations/">Please donate.</a>
631631
<br />
632632
<br />
633-
最後更新於 12月 23, 2024 (12:47 UTC)。
633+
最後更新於 12月 29, 2024 (16:06 UTC)。
634634

635635
<a href="/bugs.html">Found a bug</a>?
636636

c-api/descriptor.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ <h3>瀏覽</h3>
334334
<a href="https://www.python.org/psf/donations/">Please donate.</a>
335335
<br />
336336
<br />
337-
最後更新於 12月 23, 2024 (12:47 UTC)。
337+
最後更新於 12月 29, 2024 (16:06 UTC)。
338338

339339
<a href="/bugs.html">Found a bug</a>?
340340

c-api/dict.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ <h3>瀏覽</h3>
746746
<a href="https://www.python.org/psf/donations/">Please donate.</a>
747747
<br />
748748
<br />
749-
最後更新於 12月 23, 2024 (12:47 UTC)。
749+
最後更新於 12月 29, 2024 (16:06 UTC)。
750750

751751
<a href="/bugs.html">Found a bug</a>?
752752

c-api/exceptions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ <h3>瀏覽</h3>
17081708
<a href="https://www.python.org/psf/donations/">Please donate.</a>
17091709
<br />
17101710
<br />
1711-
最後更新於 12月 23, 2024 (12:47 UTC)。
1711+
最後更新於 12月 29, 2024 (16:06 UTC)。
17121712

17131713
<a href="/bugs.html">Found a bug</a>?
17141714

c-api/file.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ <h3>瀏覽</h3>
366366
<a href="https://www.python.org/psf/donations/">Please donate.</a>
367367
<br />
368368
<br />
369-
最後更新於 12月 23, 2024 (12:47 UTC)。
369+
最後更新於 12月 29, 2024 (16:06 UTC)。
370370

371371
<a href="/bugs.html">Found a bug</a>?
372372

c-api/float.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ <h3>瀏覽</h3>
489489
<a href="https://www.python.org/psf/donations/">Please donate.</a>
490490
<br />
491491
<br />
492-
最後更新於 12月 23, 2024 (12:47 UTC)。
492+
最後更新於 12月 29, 2024 (16:06 UTC)。
493493

494494
<a href="/bugs.html">Found a bug</a>?
495495

c-api/frame.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ <h3>瀏覽</h3>
534534
<a href="https://www.python.org/psf/donations/">Please donate.</a>
535535
<br />
536536
<br />
537-
最後更新於 12月 23, 2024 (12:47 UTC)。
537+
最後更新於 12月 29, 2024 (16:06 UTC)。
538538

539539
<a href="/bugs.html">Found a bug</a>?
540540

c-api/function.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ <h3>瀏覽</h3>
468468
<a href="https://www.python.org/psf/donations/">Please donate.</a>
469469
<br />
470470
<br />
471-
最後更新於 12月 23, 2024 (12:47 UTC)。
471+
最後更新於 12月 29, 2024 (16:06 UTC)。
472472

473473
<a href="/bugs.html">Found a bug</a>?
474474

c-api/gcsupport.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ <h3>瀏覽</h3>
611611
<a href="https://www.python.org/psf/donations/">Please donate.</a>
612612
<br />
613613
<br />
614-
最後更新於 12月 23, 2024 (12:47 UTC)。
614+
最後更新於 12月 29, 2024 (16:06 UTC)。
615615

616616
<a href="/bugs.html">Found a bug</a>?
617617

c-api/gen.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ <h3>瀏覽</h3>
328328
<a href="https://www.python.org/psf/donations/">Please donate.</a>
329329
<br />
330330
<br />
331-
最後更新於 12月 23, 2024 (12:47 UTC)。
331+
最後更新於 12月 29, 2024 (16:06 UTC)。
332332

333333
<a href="/bugs.html">Found a bug</a>?
334334

c-api/hash.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ <h3>瀏覽</h3>
420420
<a href="https://www.python.org/psf/donations/">Please donate.</a>
421421
<br />
422422
<br />
423-
最後更新於 12月 23, 2024 (12:47 UTC)。
423+
最後更新於 12月 29, 2024 (16:06 UTC)。
424424

425425
<a href="/bugs.html">Found a bug</a>?
426426

0 commit comments

Comments
 (0)