Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.8] [doc] struct: update note about network byte order form to be more helpful (GH-22201) #22203

Merged
merged 1 commit into from Sep 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions Doc/library/struct.rst
Expand Up @@ -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 ``'>'``.
Expand Down Expand Up @@ -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