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

Commitb7bc9c2

Browse files
Deploy preview for PR 1148 🛫
1 parentf86d6b9 commitb7bc9c2

File tree

571 files changed

+637
-598
lines changed

Some content is hidden

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

571 files changed

+637
-598
lines changed

‎pr-preview/pr-1148/_sources/library/codecs.rst.txt‎

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -982,17 +982,22 @@ defined in Unicode. A simple and straightforward way that can store each Unicode
982982
code point, is to store each code point as four consecutive bytes. There are two
983983
possibilities: store the bytes in big endian or in little endian order. These
984984
two encodings are called ``UTF-32-BE`` and ``UTF-32-LE`` respectively. Their
985-
disadvantage is that if e.g. you use ``UTF-32-BE`` on a little endian machine you
986-
will always have to swap bytes on encoding and decoding. ``UTF-32`` avoids this
987-
problem: bytes will always be in natural endianness. When these bytes are read
988-
by a CPU with a different endianness, then bytes have to be swapped though. To
989-
be able to detect the endianness of a ``UTF-16`` or ``UTF-32`` byte sequence,
990-
there's the so called BOM ("Byte Order Mark"). This is the Unicode character
991-
``U+FEFF``. This character can be prepended to every ``UTF-16`` or ``UTF-32``
992-
byte sequence. The byte swapped version of this character (``0xFFFE``) is an
993-
illegal character that may not appear in a Unicode text. So when the
994-
first character in a ``UTF-16`` or ``UTF-32`` byte sequence
995-
appears to be a ``U+FFFE`` the bytes have to be swapped on decoding.
985+
disadvantage is that if, for example, you use ``UTF-32-BE`` on a little endian
986+
machine you will always have to swap bytes on encoding and decoding.
987+
Python's ``UTF-16`` and ``UTF-32`` codecs avoid this problem by using the
988+
platform's native byte order when no BOM is present.
989+
Python follows prevailing platform
990+
practice, so native-endian data round-trips without redundant byte swapping,
991+
even though the Unicode Standard defaults to big-endian when the byte order is
992+
unspecified. When these bytes are read by a CPU with a different endianness,
993+
the bytes have to be swapped. To be able to detect the endianness of a
994+
``UTF-16`` or ``UTF-32`` byte sequence, a BOM ("Byte Order Mark") is used.
995+
This is the Unicode character ``U+FEFF``. This character can be prepended to every
996+
``UTF-16`` or ``UTF-32`` byte sequence. The byte swapped version of this character
997+
(``0xFFFE``) is an illegal character that may not appear in a Unicode text.
998+
When the first character of a ``UTF-16`` or ``UTF-32`` byte sequence is
999+
``U+FFFE``, the bytes have to be swapped on decoding.
1000+
9961001
Unfortunately the character ``U+FEFF`` had a second purpose as
9971002
a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no width and doesn't allow
9981003
a word to be split. It can e.g. be used to give hints to a ligature algorithm.

‎pr-preview/pr-1148/_sources/library/warnings.rst.txt‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,21 @@ Available Functions
476476
..function::warn_explicit(message, category, filename, lineno, module=None, registry=None, module_globals=None, source=None)
477477

478478
This is a low-level interface to the functionality of:func:`warn`, passing in
479-
explicitly the message, category, filename and line number, and optionally the
480-
module name and the registry (which should be the ``__warningregistry__``
481-
dictionary of the module). The module name defaults to the filename with
482-
``.py`` stripped; if no registry is passed, the warning is never suppressed.
479+
explicitly the message, category, filename and line number, and optionally
480+
other arguments.
483481
*message* must be a string and *category* a subclass of:exc:`Warning` or
484482
*message* may be a:exc:`Warning` instance, in which case *category* will be
485483
ignored.
486484

485+
*module*, if supplied, should be the module name.
486+
If no module is passed, the filename with ``.py`` stripped is used.
487+
488+
*registry*, if supplied, should be the ``__warningregistry__`` dictionary
489+
of the module.
490+
If no registry is passed, each warning is treated as the first occurrence,
491+
that is, filter actions ``"default"``, ``"module"`` and ``"once"`` are
492+
handled as ``"always"``.
493+
487494
*module_globals*, if supplied, should be the global namespace in use by the code
488495
for which the warning is issued. (This argument is used to support displaying
489496
source for modules found in zipfiles or other non-filesystem import

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ <h3>導航</h3>
314314
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
315315
<br>
316316
<br>
317-
最後更新於 10月17, 2025 (00:19 UTC)。
317+
最後更新於 10月19, 2025 (00:21 UTC)。
318318

319319
<ahref="/bugs.html">發現 bug</a>
320320

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ <h3>導航</h3>
352352
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
353353
<br>
354354
<br>
355-
最後更新於 10月17, 2025 (00:19 UTC)。
355+
最後更新於 10月19, 2025 (00:21 UTC)。
356356

357357
<ahref="/bugs.html">發現 bug</a>
358358

‎pr-preview/pr-1148/c-api/abstract.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ <h3>導航</h3>
323323
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
324324
<br>
325325
<br>
326-
最後更新於 10月17, 2025 (00:19 UTC)。
326+
最後更新於 10月19, 2025 (00:21 UTC)。
327327

328328
<ahref="/bugs.html">發現 bug</a>
329329

‎pr-preview/pr-1148/c-api/allocation.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ <h3>導航</h3>
432432
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
433433
<br>
434434
<br>
435-
最後更新於 10月17, 2025 (00:19 UTC)。
435+
最後更新於 10月19, 2025 (00:21 UTC)。
436436

437437
<ahref="/bugs.html">發現 bug</a>
438438

‎pr-preview/pr-1148/c-api/apiabiversion.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ <h3>導航</h3>
471471
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
472472
<br>
473473
<br>
474-
最後更新於 10月17, 2025 (00:19 UTC)。
474+
最後更新於 10月19, 2025 (00:21 UTC)。
475475

476476
<ahref="/bugs.html">發現 bug</a>
477477

‎pr-preview/pr-1148/c-api/arg.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ <h3>導航</h3>
954954
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
955955
<br>
956956
<br>
957-
最後更新於 10月17, 2025 (00:19 UTC)。
957+
最後更新於 10月19, 2025 (00:21 UTC)。
958958

959959
<ahref="/bugs.html">發現 bug</a>
960960

‎pr-preview/pr-1148/c-api/bool.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ <h3>導航</h3>
334334
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
335335
<br>
336336
<br>
337-
最後更新於 10月17, 2025 (00:19 UTC)。
337+
最後更新於 10月19, 2025 (00:21 UTC)。
338338

339339
<ahref="/bugs.html">發現 bug</a>
340340

‎pr-preview/pr-1148/c-api/buffer.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ <h3>導航</h3>
10161016
<ahref="https://www.python.org/psf/donations/">敬請捐贈。</a>
10171017
<br>
10181018
<br>
1019-
最後更新於 10月17, 2025 (00:19 UTC)。
1019+
最後更新於 10月19, 2025 (00:21 UTC)。
10201020

10211021
<ahref="/bugs.html">發現 bug</a>
10221022

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp