[Python-checkins] r75284 - in python/branches/py3k: Lib/struct.py Misc/NEWS Modules/_struct.c

mark.dickinson python-checkins at python.org
Thu Oct 8 17:59:20 CEST 2009


Author: mark.dickinson
Date: Thu Oct  8 17:59:20 2009
New Revision: 75284

Log:
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.
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/struct.py
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/Modules/_struct.c

Modified: python/branches/py3k/Lib/struct.py
==============================================================================
--- python/branches/py3k/Lib/struct.py	(original)
+++ python/branches/py3k/Lib/struct.py	Thu Oct  8 17:59:20 2009
@@ -1,2 +1,3 @@
 from _struct import *
 from _struct import _clearcache
+from _struct import __doc__

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Thu Oct  8 17:59:20 2009
@@ -216,6 +216,8 @@
 Extension Modules
 -----------------
 
+- Issue #7078: Set struct.__doc__ from _struct.__doc__.
+
 - Issue #3366: Add gamma function to math module.
 
 - Issue #6877: It is now possible to link the readline extension to the

Modified: python/branches/py3k/Modules/_struct.c
==============================================================================
--- python/branches/py3k/Modules/_struct.c	(original)
+++ python/branches/py3k/Modules/_struct.c	Thu Oct  8 17:59:20 2009
@@ -1900,18 +1900,20 @@
 PyDoc_STRVAR(module_doc,
 "Functions to convert between Python values and C structs.\n\
 Python bytes objects are used to hold the data representing the C struct\n\
-and also as format strings to describe the layout of data in the C struct.\n\
+and also as format strings (explained below) to describe the layout of data\n\
+in the C struct.\n\
 \n\
 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\
+  @: 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\
 \n\
 The remaining chars indicate types of args and must match exactly;\n\
 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.\n\
 Special cases (preceding decimal count indicates length):\n\


More information about the Python-checkins mailing list