Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/library/struct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ platform-dependent.
.. versionchanged:: 3.14
Added support for the ``'F'`` and ``'D'`` formats.

Complex numbers may also be represented using two consecutive floating-point
format characters. In this case, the real part is stored first, followed by
the imaginary part. The format characters ``f`` and ``d`` determine the type
used for each component.

Notes:

Expand Down
4 changes: 3 additions & 1 deletion Modules/_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -2688,7 +2688,9 @@ these can be preceded by a decimal repeat count:\n\
x: pad byte (no data); c:char; b:signed byte; B:unsigned byte;\n\
?: _Bool (requires C99; if not available, char is used instead)\n\
h:short; H:unsigned short; i:int; I:unsigned int;\n\
l:long; L:unsigned long; f:float; d:double; e:half-float.\n\
l:long; L:unsigned long; f:float; d:double; e:half-float.\n\
For complex numbers, the real and imaginary parts are represented by two\n\
consecutive values of the specified floating-point type.\n\
Special cases (preceding decimal count indicates length):\n\
s:string (array of char); p: pascal string (with count byte).\n\
Special cases (only available in native format):\n\
Expand Down
Empty file added test_PAT.txt
Empty file.
Loading