]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc
authorMartin Panter <vadmium+py@gmail.com>
Fri, 15 Apr 2016 02:14:19 +0000 (02:14 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Fri, 15 Apr 2016 02:14:19 +0000 (02:14 +0000)
This affects documentation and code comments.

27 files changed:
Doc/c-api/unicode.rst
Doc/howto/urllib2.rst
Doc/library/ctypes.rst
Doc/library/heapq.rst
Doc/library/ic.rst
Doc/library/io.rst
Doc/library/logging.handlers.rst
Doc/library/ttk.rst
Doc/library/webbrowser.rst
Doc/library/xml.etree.elementtree.rst
Doc/library/xml.sax.reader.rst
Doc/library/xmlrpclib.rst
Include/stringobject.h
Include/unicodeobject.h
Lib/heapq.py
Lib/ntpath.py
Lib/os2emxpath.py
Lib/test/test_print.py
Lib/test/test_zlib.py
Lib/xml/etree/ElementTree.py
Mac/Modules/icgluemodule.c
Misc/HISTORY
Misc/NEWS
Modules/_elementtree.c
Modules/_heapqmodule.c
Objects/codeobject.c
Python/codecs.c

index 13a28075bb7061f8b2b190e35d23d7af27ed0120..3262354d0121fbfa9e389d57c461468a5a7aa823 100644 (file)
@@ -234,7 +234,7 @@ APIs:
 
 .. c:function:: PyObject *PyUnicode_FromString(const char *u)
 
-   Create a Unicode object from an UTF-8 encoded null-terminated char buffer
+   Create a Unicode object from a UTF-8 encoded null-terminated char buffer
    *u*.
 
    .. versionadded:: 2.6
@@ -347,7 +347,7 @@ APIs:
 
 .. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, const char *encoding, const char *errors)
 
-   Coerce an encoded object *obj* to an Unicode object and return a reference with
+   Coerce an encoded object *obj* to a Unicode object and return a reference with
    incremented refcount.
 
    String and other char buffer compatible objects are decoded according to the
@@ -663,7 +663,7 @@ These are the UTF-16 codec APIs:
 
    If *Py_UNICODE_WIDE* is defined, a single :c:type:`Py_UNICODE` value may get
    represented as a surrogate pair. If it is not defined, each :c:type:`Py_UNICODE`
-   values is interpreted as an UCS-2 character.
+   values is interpreted as a UCS-2 character.
 
    Return *NULL* if an exception was raised by the codec.
 
index 30763a26a52dc18f5c1cb39469589c51eea19ff7..42e84d3fb64c523c4303f10e98549d4f93177f9f 100644 (file)
@@ -55,7 +55,7 @@ The simplest way to use urllib2 is as follows::
     html = response.read()
 
 Many uses of urllib2 will be that simple (note that instead of an 'http:' URL we
-could have used an URL starting with 'ftp:', 'file:', etc.).  However, it's the
+could have used a URL starting with 'ftp:', 'file:', etc.).  However, it's the
 purpose of this tutorial to explain the more complicated cases, concentrating on
 HTTP.
 
index 3687f867664df3ff47dabb2fd972cac6ed0dfdd5..e58d95427db54bd21ba147c0cae9dc15385e73d5 100644 (file)
@@ -1873,7 +1873,7 @@ Utility functions
    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 an unicode string
+   If the first parameter is a 8-bit string, it is converted into a unicode string
    according to ctypes conversion rules.
 
 
index 16b2fd508ba7af97e81e671426d91f20228d2cc8..3dce0376b75a46d4a402f63529f3e5d5414100ae 100644 (file)
@@ -244,7 +244,7 @@ for a tournament.  The numbers below are *k*, not ``a[k]``::
 
    15 16   17 18   19 20   21 22   23 24   25 26   27 28   29 30
 
-In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In an usual
+In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a usual
 binary tournament we see in sports, each cell is the winner over the two cells
 it tops, and we can trace the winner down the tree to see all opponents s/he
 had.  However, in many computer applications of such tournaments, we do not need
index ab40e7a941a153715f3749adc8b95d8be03900c5..5067084ddbcf781cfd3bd5d1a96426004f9badc3 100644 (file)
@@ -83,7 +83,7 @@ methods:
 
 .. method:: IC.parseurl(data[, start[, end[, hint]]])
 
-   Find an URL somewhere in *data* and return start position, end position and the
+   Find a URL somewhere in *data* and return start position, end position and the
    URL. The optional *start* and *end* can be used to limit the search, so for
    instance if a user clicks in a long text field you can pass the whole text field
    and the click-position in *start* and this routine will return the whole URL in
index 6743b2711b75ffff60baae25eb91c4442b6e0781..3d28e63ccf1d8214387bb1c48c9f42975befe9d8 100644 (file)
@@ -661,7 +661,7 @@ Text I/O
 
 .. class:: TextIOBase
 
-   Base class for text streams.  This class provides an unicode character
+   Base class for text streams.  This class provides a unicode character
    and line based interface to stream I/O.  There is no :meth:`readinto`
    method because Python's :class:`unicode` strings are immutable.
    It inherits :class:`IOBase`.  There is no public constructor.
index 6731abc4ee5ed633fb7315fb019a428aa52cfbbb..3690d865d438acdc3f5215596523fde4dca0f76c 100644 (file)
@@ -743,7 +743,7 @@ supports sending logging messages to a Web server, using either ``GET`` or
 
    .. method:: emit(record)
 
-      Sends the record to the Web server as an URL-encoded dictionary. The
+      Sends the record to the Web server as a URL-encoded dictionary. The
       :meth:`mapLogRecord` method is used to convert the record to the
       dictionary to be sent.
 
index 051601d83e23732b032f885cb4f4bcffe36feb48..bf15e71222192968feff8f977e04fd4223021cb7 100644 (file)
@@ -686,7 +686,7 @@ the widget option ``displaycolumns``. The tree widget can also display column
 headings. Columns may be accessed by number or symbolic names listed in the
 widget option columns. See `Column Identifiers`_.
 
-Each item is identified by an unique name. The widget will generate item IDs
+Each item is identified by a unique name. The widget will generate item IDs
 if they are not supplied by the caller. There is a distinguished root item,
 named ``{}``. The root item itself is not displayed; its children appear at the
 top level of the hierarchy.
index 64e7099b2f0f5ad3f30667ffa6e4769416a06b86..f74b89ff82b59519501e710519fb7ead713760b7 100644 (file)
@@ -33,7 +33,7 @@ browsers are not available on Unix, the controlling process will launch a new
 browser and wait.
 
 The script :program:`webbrowser` can be used as a command-line interface for the
-module. It accepts an URL as the argument. It accepts the following optional
+module. It accepts a URL as the argument. It accepts the following optional
 parameters: ``-n`` opens the URL in a new browser window, if possible;
 ``-t`` opens the URL in a new browser page ("tab"). The options are,
 naturally, mutually exclusive.  Usage example::
index 212a9e1e7a94e728f8e8287ddf98e9f3c9d09a1f..b588598772d8ae0260993a9ae539e722925fac7b 100644 (file)
@@ -901,7 +901,7 @@ QName Objects
    to get proper namespace handling on output.  *text_or_uri* is a string
    containing the QName value, in the form {uri}local, or, if the tag argument
    is given, the URI part of a QName.  If *tag* is given, the first argument is
-   interpreted as an URI, and this argument is interpreted as a local name.
+   interpreted as a URI, and this argument is interpreted as a local name.
    :class:`QName` instances are opaque.
 
 
index 6956cd1fb30104efa1b67d529f83da06621e27da..7270153d463793a1ee4c87079a2955fb0737b753 100644 (file)
@@ -101,7 +101,7 @@ The :class:`XMLReader` interface supports the following methods:
 
    Process an input source, producing SAX events. The *source* object can be a
    system identifier (a string identifying the input source -- typically a file
-   name or an URL), a file-like object, or an :class:`InputSource` object. When
+   name or a URL), a file-like object, or an :class:`InputSource` object. When
    :meth:`parse` returns, the input is completely processed, and the parser object
    can be discarded or reset. As a limitation, the current implementation only
    accepts byte streams; processing of character streams is for further study.
index 627a282c2362ec93058dc1e7b0225ec64d2ea94f..60fe5792152b8db231e12731ae2b8994ab316fc3 100644 (file)
@@ -434,11 +434,11 @@ does not exist).  It has the following attributes:
    error.
 
 In the following example we're going to intentionally cause a :exc:`ProtocolError`
-by providing an URI that doesn't point to an XMLRPC server::
+by providing a URI that doesn't point to an XMLRPC server::
 
    import xmlrpclib
 
-   # create a ServerProxy with an URI that doesn't respond to XMLRPC requests
+   # create a ServerProxy with a URI that doesn't respond to XMLRPC requests
    proxy = xmlrpclib.ServerProxy("http://www.google.com/")
 
    try:
index 18b5b411aca6943b2d0b560f9a1faeaaedba84b0..12cc093c629e973d0e5ecd83a9e9506826b179fe 100644 (file)
@@ -129,7 +129,7 @@ PyAPI_FUNC(PyObject*) PyString_AsEncodedObject(
 /* Encodes a string object and returns the result as Python string
    object.   
    
-   If the codec returns an Unicode object, the object is converted
+   If the codec returns a Unicode object, the object is converted
    back to a string using the default encoding.
 
    DEPRECATED - use PyString_AsEncodedObject() instead. */
@@ -152,7 +152,7 @@ PyAPI_FUNC(PyObject*) PyString_AsDecodedObject(
 /* Decodes a string object and returns the result as Python string
    object.  
    
-   If the codec returns an Unicode object, the object is converted
+   If the codec returns a Unicode object, the object is converted
    back to a string using the default encoding.
 
    DEPRECATED - use PyString_AsDecodedObject() instead. */
@@ -164,7 +164,7 @@ PyAPI_FUNC(PyObject*) PyString_AsDecodedString(
     );
 
 /* Provides access to the internal data buffer and size of a string
-   object or the default encoded version of an Unicode object. Passing
+   object or the default encoded version of a Unicode object. Passing
    NULL as *len parameter will force the string buffer to be
    0-terminated (passing a string with embedded NULL characters will
    cause an exception).  */
index d15ebb8df60bff04676865c8b0ba45bf8085c73b..9184eb100b47f062c40c3457f00a8892bf189d57 100644 (file)
@@ -513,7 +513,7 @@ PyAPI_FUNC(int) PyUnicode_Resize(
     Py_ssize_t length           /* New length */
     );
 
-/* Coerce obj to an Unicode object and return a reference with
+/* Coerce obj to a Unicode object and return a reference with
    *incremented* refcount.
 
    Coercion is done in the following way:
@@ -536,7 +536,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_FromEncodedObject(
     const char *errors          /* error handling */
     );
 
-/* Coerce obj to an Unicode object and return a reference with
+/* Coerce obj to a Unicode object and return a reference with
    *incremented* refcount.
 
    Unicode objects are passed back as-is (subclasses are converted to
index 4b2c0c444110fae356e51c89db7dbece4bdfaf90..f8269e15e407e329096074687ac002903840fdc6 100644 (file)
@@ -56,7 +56,7 @@ representation for a tournament.  The numbers below are `k', not a[k]:
 
 
 In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'.  In
-an usual binary tournament we see in sports, each cell is the winner
+a usual binary tournament we see in sports, each cell is the winner
 over the two cells it tops, and we can trace the winner down the tree
 to see all opponents s/he had.  However, in many computer applications
 of such tournaments, we do not need to trace the history of a winner.
index 58951b90516ae072429781e7a0342863ad676860..0b85b0b9be46fc0391bd6d4785b2dec33f091835 100644 (file)
@@ -141,7 +141,7 @@ def splitunc(p):
     Return a 2-tuple (unc, rest); either part may be empty.
     If unc is not empty, it has the form '//host/mount' (or similar
     using backslashes).  unc+rest is always the input path.
-    Paths containing drive letters never have an UNC part.
+    Paths containing drive letters never have a UNC part.
     """
     if p[1:2] == ':':
         return '', p # Drive letter present
@@ -227,7 +227,7 @@ def islink(path):
 lexists = exists
 
 # Is a path a mount point?  Either a root (with or without drive letter)
-# or an UNC path with at most a / or \ after the mount point.
+# or a UNC path with at most a / or \ after the mount point.
 
 def ismount(path):
     """Test whether a path is a mount point (defined as root of drive)"""
index 0b32d636ca83f9db894adc2095241d51c9da778d..6691b7d8b49b54cd08624df1970d06be27d62bcc 100644 (file)
@@ -62,7 +62,7 @@ def splitunc(p):
     Return a 2-tuple (unc, rest); either part may be empty.
     If unc is not empty, it has the form '//host/mount' (or similar
     using backslashes).  unc+rest is always the input path.
-    Paths containing drive letters never have an UNC part.
+    Paths containing drive letters never have a UNC part.
     """
     if p[1:2] == ':':
         return '', p # Drive letter present
@@ -105,7 +105,7 @@ lexists = exists
 # Is a path a directory?
 
 # Is a path a mount point?  Either a root (with or without drive letter)
-# or an UNC path with at most a / or \ after the mount point.
+# or a UNC path with at most a / or \ after the mount point.
 
 def ismount(path):
     """Test whether a path is a mount point (defined as root of drive)"""
index b7263470e2df9226feebd1476c4815916cafeed6..e8d9e6686b64542fe831d3f5f29d1d5b2bc41d99 100644 (file)
@@ -107,7 +107,7 @@ class TestPrint(unittest.TestCase):
         self.assertRaises(AttributeError, print, '', file='')
 
     def test_mixed_args(self):
-        # If an unicode arg is passed, sep and end should be unicode, too.
+        # If a unicode arg is passed, sep and end should be unicode, too.
         class Recorder(object):
 
             def __init__(self, must_be_unicode):
index c8fc985cfd77c8239409a666307dcbd790f84d5a..cc1340946b387647903c97340498b2940fb97e52 100644 (file)
@@ -150,7 +150,7 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
         self.assertEqual(zlib.decompress(x), data)
 
     def test_incomplete_stream(self):
-        # An useful error message is given
+        # A useful error message is given
         x = zlib.compress(HAMLET_SCENE)
         self.assertRaisesRegexp(zlib.error,
             "Error -5 while decompressing data: incomplete or truncated stream",
index c6e3d396b19dd57411dc68e889e156eea238f8bc..cf6402f8c5f5886a9df7e734b0e4ca3c63e93522 100644 (file)
@@ -574,7 +574,7 @@ PI = ProcessingInstruction
 # @param text A string containing the QName value, in the form {uri}local,
 #     or, if the tag argument is given, the URI part of a QName.
 # @param tag Optional tag.  If given, the first argument is interpreted as
-#     an URI, and this argument is interpreted as a local name.
+#     a URI, and this argument is interpreted as a local name.
 # @return An opaque object, representing the QName.
 
 class QName(object):
index 4d17bf7841f77292f4ecb599e96f789e13ecb46f..3a47cd04b51a24db1a39cea386684f1adce8ef27 100644 (file)
@@ -229,7 +229,7 @@ ici_ICEditPreferences(iciobject *self, PyObject *args)
 
 
 static char ici_ICParseURL__doc__[] =
-"(hint, data, selStart, selEnd, handle)->selStart, selEnd; Find an URL, return in handle"
+"(hint, data, selStart, selEnd, handle)->selStart, selEnd; Find a URL, return in handle"
 ;
 
 static PyObject *
@@ -253,7 +253,7 @@ ici_ICParseURL(iciobject *self, PyObject *args)
 
 
 static char ici_ICLaunchURL__doc__[] =
-"(hint, data, selStart, selEnd)->None; Find an URL and launch the correct app"
+"(hint, data, selStart, selEnd)->None; Find a URL and launch the correct app"
 ;
 
 static PyObject *
index b9e74da405300d87a682e030c2e4f5f47d768660..60635fbb036557987165dd097b5aa9ea780fdf2e 100644 (file)
@@ -8024,7 +8024,7 @@ Core language, builtins, and interpreter
 
 - There is a new Unicode companion to the PyObject_Str() API
   called PyObject_Unicode(). It behaves in the same way as the
-  former, but assures that the returned value is an Unicode object
+  former, but assures that the returned value is a Unicode object
   (applying the usual coercion if necessary).
 
 - The comparison operators support "rich comparison overloading" (PEP
index cebb5a5aecdf188dc0f5be620283610a1acbffa4..9288612dd85e2c683a510f91cde323b56717b161 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -5992,7 +5992,7 @@ Core and Builtins
 - Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it
   is set.
 
-- Issue #1583863: An unicode subclass can now override the __unicode__ method
+- Issue #1583863: A unicode subclass can now override the __unicode__ method
 
 - Issue #6474: Make error message from passing an inadequate number of keyword
   arguments to a function correct.
@@ -6497,7 +6497,7 @@ Library
   when the release file is empty.
 
 - Issue #7748: Since unicode values are supported for some metadata options in
-  Distutils, the DistributionMetadata get_* methods will now return an utf-8
+  Distutils, the DistributionMetadata get_* methods will now return a utf-8
   encoded string for them.  This ensures that the upload and register commands
   send the correct values to PyPI without any error.
 
@@ -8873,7 +8873,7 @@ Library
 - Silence the DeprecationWarning raised when importing mimetools in
   BaseHTTPServer, cgi (and rfc822), httplib.
 
-- Issue #2776: fixed small issue when handling an URL with double slash
+- Issue #2776: fixed small issue when handling a URL with double slash
   after a 302 response in the case of not going through a proxy.
 
 - Issue #2676: in the email package, content-type parsing was hanging on
@@ -10205,7 +10205,7 @@ Core and builtins
   ``object.__reduce_ex__()`` is called with an object that is faking
   its type.
 
-- Patch #1680015: Don't modify __slots__ tuple if it contains an
+- Patch #1680015: Don't modify __slots__ tuple if it contains a
   unicode name.
 
 - Patch #1444529: the builtin compile() now accepts keyword arguments.
index 0d16a697a0ea1d06a795b6ed81fae8d51d21eb26..6f628a5c1444d4ea3e775f10a83c8b4d417050c3 100644 (file)
@@ -2104,7 +2104,7 @@ makeuniversal(XMLParserObject* self, const char* string)
         /* decode universal name */
 #if defined(Py_USING_UNICODE)
         /* inline makestring, to avoid duplicating the source string if
-           it's not an utf-8 string */
+           it's not a utf-8 string */
         p = PyString_AS_STRING(tag);
         if (checkstring(p, size)) {
             value = PyUnicode_DecodeUTF8(p, size, "strict");
index be301a62fc6222a833a8ecd078be1a7040084f23..5b0ef691545ba585a0faac8da3ddd2718cab22ab 100644 (file)
@@ -619,7 +619,7 @@ representation for a tournament.  The numbers below are `k', not a[k]:\n\
 \n\
 \n\
 In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'.  In\n\
-an usual binary tournament we see in sports, each cell is the winner\n\
+a usual binary tournament we see in sports, each cell is the winner\n\
 over the two cells it tops, and we can trace the winner down the tree\n\
 to see all opponents s/he had.  However, in many computer applications\n\
 of such tournaments, we do not need to trace the history of a winner.\n\
index 7e74607bd1127d04da89c235e49d723bf3603dd7..c104098268764009158ed8e516eb449aa958021a 100644 (file)
@@ -492,7 +492,7 @@ _PyCode_ConstantKey(PyObject *op)
         return key;
     }
     else {
-        /* for other types, use the object identifier as an unique identifier
+        /* for other types, use the object identifier as a unique identifier
          * to ensure that they are seen as unequal. */
         PyObject *obj_id = PyLong_FromVoidPtr(op);
         if (obj_id == NULL)
index d672362c4ce49715f85b021c6d98ac0e9034fc41..dbecd1dcccfca5a2d4b901249a9e99a513648b03 100644 (file)
@@ -334,7 +334,7 @@ PyObject *PyCodec_StreamWriter(const char *encoding,
     return codec_getstreamcodec(encoding, stream, errors, 3);
 }
 
-/* Encode an object (e.g. an Unicode object) using the given encoding
+/* Encode an object (e.g. a Unicode object) using the given encoding
    and return the resulting encoded object (usually a Python string).
 
    errors is passed to the encoder factory as argument if non-NULL. */
@@ -379,7 +379,7 @@ _PyCodec_EncodeInternal(PyObject *object,
 }
 
 /* Decode an object (usually a Python string) using the given encoding
-   and return an equivalent object (e.g. an Unicode object).
+   and return an equivalent object (e.g. a Unicode object).
 
    errors is passed to the decoder factory as argument if non-NULL. */