[Python-checkins] cpython (2.7): Corrections for a/an in code comments and documentation

martin.panter python-checkins at python.org
Sun May 8 09:18:26 EDT 2016


https://hg.python.org/cpython/rev/1b4320232e61
changeset:   101267:1b4320232e61
branch:      2.7
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sun May 08 13:45:55 2016 +0000
summary:
  Corrections for a/an in code comments and documentation

files:
  Demo/metaclasses/index.html   |  2 +-
  Doc/c-api/string.rst          |  2 +-
  Doc/library/codecs.rst        |  2 +-
  Doc/library/ctypes.rst        |  2 +-
  Doc/library/imageop.rst       |  2 +-
  Doc/library/stdtypes.rst      |  2 +-
  Include/memoryobject.h        |  2 +-
  Include/pythonrun.h           |  2 +-
  Lib/lib-tk/Tkinter.py         |  2 +-
  Lib/test/test_imageop.py      |  2 +-
  Mac/README                    |  2 +-
  Misc/cheatsheet               |  2 +-
  Modules/audioop.c             |  6 +++---
  Objects/floatobject.c         |  2 +-
  Objects/stringlib/formatter.h |  4 ++--
  PC/pyconfig.h                 |  2 +-
  16 files changed, 19 insertions(+), 19 deletions(-)


diff --git a/Demo/metaclasses/index.html b/Demo/metaclasses/index.html
--- a/Demo/metaclasses/index.html
+++ b/Demo/metaclasses/index.html
@@ -222,7 +222,7 @@
 means calling the metainstance, and this will return a real instance.
 And what class is that an instance of?  Conceptually, it is of course
 an instance of our metainstance; but in most cases the Python runtime
-system will see it as an instance of a a helper class used by the
+system will see it as an instance of a helper class used by the
 metaclass to implement its (non-meta) instances...
 
 <P>Hopefully an example will make things clearer.  Let's presume we
diff --git a/Doc/c-api/string.rst b/Doc/c-api/string.rst
--- a/Doc/c-api/string.rst
+++ b/Doc/c-api/string.rst
@@ -88,7 +88,7 @@
    | :attr:`%%`        | *n/a*         | The literal % character.       |
    +-------------------+---------------+--------------------------------+
    | :attr:`%c`        | int           | A single character,            |
-   |                   |               | represented as an C int.       |
+   |                   |               | represented as a C int.        |
    +-------------------+---------------+--------------------------------+
    | :attr:`%d`        | int           | Exactly equivalent to          |
    |                   |               | ``printf("%d")``.              |
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -909,7 +909,7 @@
 
 * an ISO 8859 codeset
 
-* a Microsoft Windows code page, which is typically derived from a 8859 codeset,
+* a Microsoft Windows code page, which is typically derived from an 8859 codeset,
   but replaces control characters with additional graphic characters
 
 * an IBM EBCDIC code page
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -1873,7 +1873,7 @@
    allows specifying the size of the array if the length of the string should not
    be used.
 
-   If the first parameter is a 8-bit string, it is converted into a unicode string
+   If the first parameter is an 8-bit string, it is converted into a unicode string
    according to ctypes conversion rules.
 
 
diff --git a/Doc/library/imageop.rst b/Doc/library/imageop.rst
--- a/Doc/library/imageop.rst
+++ b/Doc/library/imageop.rst
@@ -49,7 +49,7 @@
 
 .. function:: grey2mono(image, width, height, threshold)
 
-   Convert a 8-bit deep greyscale image to a 1-bit deep image by thresholding all
+   Convert an 8-bit deep greyscale image to a 1-bit deep image by thresholding all
    the pixels.  The resulting image is tightly packed and is probably only useful
    as an argument to :func:`mono2grey`.
 
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2749,7 +2749,7 @@
    .. attribute:: shape
 
       A tuple of integers the length of :attr:`ndim` giving the shape of the
-      memory as a N-dimensional array.
+      memory as an N-dimensional array.
 
    .. attribute:: ndim
 
diff --git a/Include/memoryobject.h b/Include/memoryobject.h
--- a/Include/memoryobject.h
+++ b/Include/memoryobject.h
@@ -33,7 +33,7 @@
        original buffer if a copy must be made.  If buffertype is
        PyBUF_WRITE and the buffer is not contiguous an error will
        be raised.  In this circumstance, the user can use
-       PyBUF_SHADOW to ensure that a a writable temporary
+       PyBUF_SHADOW to ensure that a writable temporary
        contiguous buffer is returned.  The contents of this
        contiguous buffer will be copied back into the original
        object after the memoryview object is deleted as long as
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -155,7 +155,7 @@
 
 /* Stack size, in "pointers" (so we get extra safety margins
    on 64-bit platforms).  On a 32-bit platform, this translates
-   to a 8k margin. */
+   to an 8k margin. */
 #define PYOS_STACK_MARGIN 2048
 
 #if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1300
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1252,7 +1252,7 @@
         # time field: "valid for events that contain a time field"
         # width field: Configure, ConfigureRequest, Create, ResizeRequest,
         # and Expose events only
-        # x field: "valid for events that contain a x field"
+        # x field: "valid for events that contain an x field"
         # y field: "valid for events that contain a y field"
         # keysym as decimal: KeyPress and KeyRelease events only
         # x_root, y_root fields: ButtonPress, ButtonRelease, KeyPress,
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py
--- a/Lib/test/test_imageop.py
+++ b/Lib/test/test_imageop.py
@@ -121,7 +121,7 @@
         print 'grey2rgb'
     image = imageop.grey2rgb(greyimage, width, height)
 
-    # Convert a 8-bit deep greyscale image to a 1-bit deep image by
+    # Convert an 8-bit deep greyscale image to a 1-bit deep image by
     # thresholding all the pixels. The resulting image is tightly packed
     # and is probably only useful as an argument to mono2grey.
     if verbose:
diff --git a/Mac/README b/Mac/README
--- a/Mac/README
+++ b/Mac/README
@@ -125,7 +125,7 @@
 
 To build a universal binary that includes a 64-bit architecture, you must build
 on a system running OS X 10.5 or later.  The ``all`` and ``64-bit`` flavors can
-only be built with an 10.5 SDK because ``ppc64`` support was only included with
+only be built with a 10.5 SDK because ``ppc64`` support was only included with
 OS X 10.5.  Although legacy ``ppc`` support was included with Xcode 3 on OS X
 10.6, it was removed in Xcode 4, versions of which were released on OS X 10.6
 and which is the standard for OS X 10.7.  To summarize, the
diff --git a/Misc/cheatsheet b/Misc/cheatsheet
--- a/Misc/cheatsheet
+++ b/Misc/cheatsheet
@@ -1053,7 +1053,7 @@
                     recommanded to use the following form:if isinstance(x,
                     types.StringType): etc...
 unichr(code)        code.
-unicode(string[,    Creates a Unicode string from a 8-bit string, using
+unicode(string[,    Creates a Unicode string from an 8-bit string, using
 encoding[, error    thegiven encoding name and error treatment ('strict',
 ]]])                'ignore',or 'replace'}.
                     Without arguments, returns a dictionary correspondingto the
diff --git a/Modules/audioop.c b/Modules/audioop.c
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -55,7 +55,7 @@
  */
 #define BIAS 0x84   /* define the add-in bias for 16 bit samples */
 #define CLIP 32635
-#define SIGN_BIT        (0x80)          /* Sign bit for a A-law byte. */
+#define SIGN_BIT        (0x80)          /* Sign bit for an A-law byte. */
 #define QUANT_MASK      (0xf)           /* Quantization field mask. */
 #define SEG_SHIFT       (4)             /* Left shift for segment number. */
 #define SEG_MASK        (0x70)          /* Segment field mask. */
@@ -229,8 +229,8 @@
 };
 
 /*
- * linear2alaw() accepts an 13-bit signed integer and encodes it as A-law data
- * stored in a unsigned char.  This function should only be called with
+ * linear2alaw() accepts a 13-bit signed integer and encodes it as A-law data
+ * stored in an unsigned char.  This function should only be called with
  * the data shifted such that it only contains information in the lower
  * 13-bits.
  *
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -407,7 +407,7 @@
  * may lose info from fractional bits.  Converting the integer to a double
  * also has two failure modes:  (1) a long int may trigger overflow (too
  * large to fit in the dynamic range of a C double); (2) even a C long may have
- * more bits than fit in a C double (e.g., on a a 64-bit box long may have
+ * more bits than fit in a C double (e.g., on a 64-bit box long may have
  * 63 bits of precision, but a C double probably has only 53), and then
  * we can falsely claim equality when low-order integer bits are lost by
  * coercion to double.  So this part is painful too.
diff --git a/Objects/stringlib/formatter.h b/Objects/stringlib/formatter.h
--- a/Objects/stringlib/formatter.h
+++ b/Objects/stringlib/formatter.h
@@ -995,7 +995,7 @@
     if (precision < 0)
         precision = default_precision;
 
-    /* Cast "type", because if we're in unicode we need to pass a
+    /* Cast "type", because if we're in unicode we need to pass an
        8-bit char. This is safe, because we've restricted what "type"
        can be. */
     buf = PyOS_double_to_string(val, (char)type, precision, flags,
@@ -1175,7 +1175,7 @@
     if (precision < 0)
         precision = default_precision;
 
-    /* Cast "type", because if we're in unicode we need to pass a
+    /* Cast "type", because if we're in unicode we need to pass an
        8-bit char. This is safe, because we've restricted what "type"
        can be. */
     re_buf = PyOS_double_to_string(re, (char)type, precision, flags,
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -368,7 +368,7 @@
 #	define SIZEOF_FPOS_T 8
 #	define SIZEOF_HKEY 4
 #	define SIZEOF_SIZE_T 4
-	/* MS VS2005 changes time_t to an 64-bit type on all platforms */
+	/* MS VS2005 changes time_t to a 64-bit type on all platforms */
 #	if defined(_MSC_VER) && _MSC_VER >= 1400
 #	define SIZEOF_TIME_T 8
 #	else

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list