diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-09-11 15:29:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-11 15:29:04 (GMT) |
commit | e4c6947024d5ad3d90c0a35f762bb85ccc2b0092 (patch) | |
tree | 728817aeac625c7f29ec160dc7860f7e5ace517f /Doc/library | |
parent | 8a30bdd21dff6d1957df135c9d0b9983a0f61228 (diff) | |
download | cpython-e4c6947024d5ad3d90c0a35f762bb85ccc2b0092.zip cpython-e4c6947024d5ad3d90c0a35f762bb85ccc2b0092.tar.gz cpython-e4c6947024d5ad3d90c0a35f762bb85ccc2b0092.tar.bz2 |
[doc] struct: update note about network byte order form to be more helpful (GH-22201)
Update the sentence to provide some context on why network byte order is defined as big endian.
(cherry picked from commit fb2718720346c8c7a0ad2d7477f20e9a5524ea0c)
Co-authored-by: Stargirl Flowers <theaflowers@google.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/struct.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst index 56b0a36..278cb19 100644 --- a/Doc/library/struct.rst +++ b/Doc/library/struct.rst @@ -159,8 +159,8 @@ the :ref:`format-characters` section. Note the difference between ``'@'`` and ``'='``: both use native byte order, but the size and alignment of the latter is standardized. -The form ``'!'`` is available for those poor souls who claim they can't remember -whether network byte order is big-endian or little-endian. +The form ``'!'`` represents the network byte order which is always big-endian +as defined in `IETF RFC 1700 <IETF RFC 1700_>`_. There is no way to indicate non-native byte order (force byte-swapping); use the appropriate choice of ``'<'`` or ``'>'``. @@ -467,3 +467,5 @@ The :mod:`struct` module also defines the following type: .. _half precision format: https://en.wikipedia.org/wiki/Half-precision_floating-point_format .. _ieee 754 standard: https://en.wikipedia.org/wiki/IEEE_floating_point#IEEE_754-2008 + +.. _IETF RFC 1700: https://tools.ietf.org/html/rfc1700 |