New submission from Eli_B <eli.boyar...@gmail.com>:

In module struct's docstring, it says:
"...
The optional first format char indicates byte order, size and alignment:\n
  @: native order, size & alignment (default)\n
  =: native order, std. size & alignment\n
  <: little-endian, std. size & alignment\n
  >: big-endian, std. size & alignment\n
  !: same as >\n
..."
The wording sounds like either native or standard alignment is performed, 
regardless of the optional first format char.

In comparison, the table in 
https://docs.python.org/3.8/library/struct.html#byte-order-size-and-alignment 
states that in all modes other than the default, no alignment is performed. 
This is the actual behavior of the module.

----------
assignee: docs@python
components: Documentation
messages: 312214
nosy: Eli_B, docs@python
priority: normal
severity: normal
status: open
title: struct's docstring implies alignment is always performed
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32853>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to