Skip to content

Commit 40714af

Browse files
committed
Merged revisions 75283 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75283 | mark.dickinson | 2009-10-08 16:54:10 +0100 (Thu, 08 Oct 2009) | 4 lines Issue #7078: _struct.__doc__ was being ignored. Import it into struct. Also add description of '?' struct format character. Thanks Gabriel Genellina for the patch. ........
1 parent 097e51f commit 40714af

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

Lib/struct.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
from _struct import *
22
from _struct import _clearcache
3+
from _struct import __doc__

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ Library
216216
Extension Modules
217217
-----------------
218218

219+
- Issue #7078: Set struct.__doc__ from _struct.__doc__.
220+
219221
- Issue #3366: Add gamma function to math module.
220222

221223
- Issue #6877: It is now possible to link the readline extension to the

Modules/_struct.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,18 +1900,20 @@ static struct PyMethodDef module_functions[] = {
19001900
PyDoc_STRVAR(module_doc,
19011901
"Functions to convert between Python values and C structs.\n\
19021902
Python bytes objects are used to hold the data representing the C struct\n\
1903-
and also as format strings to describe the layout of data in the C struct.\n\
1903+
and also as format strings (explained below) to describe the layout of data\n\
1904+
in the C struct.\n\
19041905
\n\
19051906
The optional first format char indicates byte order, size and alignment:\n\
1906-
@: native order, size & alignment (default)\n\
1907-
=: native order, std. size & alignment\n\
1908-
<: little-endian, std. size & alignment\n\
1909-
>: big-endian, std. size & alignment\n\
1910-
!: same as >\n\
1907+
@: native order, size & alignment (default)\n\
1908+
=: native order, std. size & alignment\n\
1909+
<: little-endian, std. size & alignment\n\
1910+
>: big-endian, std. size & alignment\n\
1911+
!: same as >\n\
19111912
\n\
19121913
The remaining chars indicate types of args and must match exactly;\n\
19131914
these can be preceded by a decimal repeat count:\n\
19141915
x: pad byte (no data); c:char; b:signed byte; B:unsigned byte;\n\
1916+
?: _Bool (requires C99; if not available, char is used instead)\n\
19151917
h:short; H:unsigned short; i:int; I:unsigned int;\n\
19161918
l:long; L:unsigned long; f:float; d:double.\n\
19171919
Special cases (preceding decimal count indicates length):\n\

0 commit comments

Comments
 (0)