]> granicus.if.org Git - python/commitdiff
Issue #25523: Further a-to-an corrections.
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 2 Nov 2015 12:10:23 +0000 (14:10 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 2 Nov 2015 12:10:23 +0000 (14:10 +0200)
34 files changed:
Doc/distutils/packageindex.rst
Doc/howto/descriptor.rst
Doc/install/index.rst
Doc/library/asyncio-protocol.rst
Doc/library/contextlib.rst
Doc/library/email.parser.rst
Doc/library/gzip.rst
Doc/library/pickle.rst
Doc/library/socket.rst
Doc/library/tokenize.rst
Doc/library/unittest.rst
Doc/library/urllib.request.rst
Doc/library/xml.dom.minidom.rst
Doc/library/zlib.rst
Doc/whatsnew/2.7.rst
Doc/whatsnew/3.3.rst
Include/unicodeobject.h
Lib/asyncio/sslproto.py
Lib/asyncio/transports.py
Lib/ctypes/test/test_random_things.py
Lib/http/cookiejar.py
Lib/lib2to3/fixes/fix_metaclass.py
Lib/msilib/schema.py
Lib/test/regrtest.py
Lib/test/test_dict.py
Lib/test/test_io.py
Lib/test/test_socket.py
Lib/test/test_userdict.py
Lib/tkinter/__init__.py
Misc/HISTORY
Misc/NEWS
Modules/_ssl.c
Modules/itertoolsmodule.c
Objects/unicodeobject.c

index daf93452648718aa27abda4b86e9ac417b87b23d..2d7daef784af5070874d7e79ac1da921a4699993 100644 (file)
@@ -167,7 +167,7 @@ follows::
     username: <username>
     password: <password>
 
-The *distutils* section defines a *index-servers* variable that lists the
+The *distutils* section defines an *index-servers* variable that lists the
 name of all sections describing a repository.
 
 Each section describing a repository defines three variables:
index f018b0e893107afaceeb79c05906586fb4970359..530f34b88f9b5b42ce02b1a261c34e85d5d2dd66 100644 (file)
@@ -319,7 +319,7 @@ Non-data descriptors provide a simple mechanism for variations on the usual
 patterns of binding functions into methods.
 
 To recap, functions have a :meth:`__get__` method so that they can be converted
-to a method when accessed as attributes.  The non-data descriptor transforms a
+to a method when accessed as attributes.  The non-data descriptor transforms an
 ``obj.f(*args)`` call into ``f(obj, *args)``.  Calling ``klass.f(*args)``
 becomes ``f(*args)``.
 
index 8f3ad7241af5dfc09a05383b0524669dee041e81..2d83079d4cf139e73ce09c2c43d844bf1d3e4b8a 100644 (file)
@@ -148,7 +148,7 @@ into.  For example, if you've just downloaded a module source distribution
 
 On Windows, you'd probably download :file:`foo-1.0.zip`.  If you downloaded the
 archive file to :file:`C:\\Temp`, then it would unpack into
-:file:`C:\\Temp\\foo-1.0`; you can use either a archive manipulator with a
+:file:`C:\\Temp\\foo-1.0`; you can use either an archive manipulator with a
 graphical user interface (such as WinZip) or a command-line tool (such as
 :program:`unzip` or :program:`pkunzip`) to unpack the archive.  Then, open a
 command prompt window and run::
index 698d2bfa1a9b2a7b59c3e7a456f790073c724d5c..e714488eaf71bfe548c246075421fbccb49161f1 100644 (file)
@@ -148,7 +148,7 @@ WriteTransport
       high-water limit.  Neither *high* nor *low* can be negative.
 
       The defaults are implementation-specific.  If only the
-      high-water limit is given, the low-water limit defaults to a
+      high-water limit is given, the low-water limit defaults to an
       implementation-specific value less than or equal to the
       high-water limit.  Setting *high* to zero forces *low* to zero as
       well, and causes :meth:`pause_writing` to be called whenever the
index e5675493db3e0775756e4752cc40946a9c43c24b..2b2ceceb2e1686c088fa88a4949571f6b4e878c4 100644 (file)
@@ -142,7 +142,7 @@ Functions and classes provided:
    is hardwired to stdout.
 
    For example, the output of :func:`help` normally is sent to *sys.stdout*.
-   You can capture that output in a string by redirecting the output to a
+   You can capture that output in a string by redirecting the output to an
    :class:`io.StringIO` object::
 
         f = io.StringIO()
index ec74fe028a58928284a269237d5dae7dfb363b2a..177adc62e77f4d946ec4728bda72038aa68587b6 100644 (file)
@@ -146,7 +146,7 @@ have the same API as the :class:`Parser` and :class:`BytesParser` classes.
       methods on file-like objects.
 
       The text contained in *fp* must be formatted as a block of :rfc:`2822`
-      style headers and header continuation lines, optionally preceded by a
+      style headers and header continuation lines, optionally preceded by an
       envelope header.  The header block is terminated either by the end of the
       data or by a blank line.  Following the header block is the body of the
       message (which may contain MIME-encoded subparts).
@@ -189,7 +189,7 @@ have the same API as the :class:`Parser` and :class:`BytesParser` classes.
       methods on file-like objects.
 
       The bytes contained in *fp* must be formatted as a block of :rfc:`2822`
-      style headers and header continuation lines, optionally preceded by a
+      style headers and header continuation lines, optionally preceded by an
       envelope header.  The header block is terminated either by the end of the
       data or by a blank line.  Following the header block is the body of the
       message (which may contain MIME-encoded subparts, including subparts
index ce02077d676b9e92d816e9fcfc5bb700a39e4a6a..355cf9ccfefe684c944e802eef3c52c436d65053 100644 (file)
@@ -64,7 +64,7 @@ The module defines the following items:
    method.  At least one of *fileobj* and *filename* must be given a non-trivial
    value.
 
-   The new class instance is based on *fileobj*, which can be a regular file, a
+   The new class instance is based on *fileobj*, which can be a regular file, an
    :class:`io.BytesIO` object, or any other object which simulates a file.  It
    defaults to ``None``, in which case *filename* is opened to provide a file
    object.
index 08618fa766ebac5e8919f5839bef84419f049e1f..3305195853f1c70ce1688c766d92af90b66c5db1 100644 (file)
@@ -192,7 +192,7 @@ process more convenient:
    number is specified, :data:`HIGHEST_PROTOCOL` is selected.
 
    The *file* argument must have a write() method that accepts a single bytes
-   argument.  It can thus be an on-disk file opened for binary writing, a
+   argument.  It can thus be an on-disk file opened for binary writing, an
    :class:`io.BytesIO` instance, or any other custom object that meets this
    interface.
 
@@ -288,7 +288,7 @@ The :mod:`pickle` module exports two classes, :class:`Pickler` and
    number is specified, :data:`HIGHEST_PROTOCOL` is selected.
 
    The *file* argument must have a write() method that accepts a single bytes
-   argument.  It can thus be an on-disk file opened for binary writing, a
+   argument.  It can thus be an on-disk file opened for binary writing, an
    :class:`io.BytesIO` instance, or any other custom object that meets this
    interface.
 
index 80d5811da58a81ae2d12183f3d3616d021886558..8577c3c908e6f8754b482a035c9333f9c6a66809 100644 (file)
@@ -762,7 +762,7 @@ The :mod:`socket` module also offers various network-related services:
 
 .. function:: sethostname(name)
 
-   Set the machine's hostname to *name*.  This will raise a
+   Set the machine's hostname to *name*.  This will raise an
    :exc:`OSError` if you don't have enough rights.
 
    Availability: Unix.
@@ -794,7 +794,7 @@ The :mod:`socket` module also offers various network-related services:
 
 .. function:: if_indextoname(if_index)
 
-   Return a network interface name corresponding to a
+   Return a network interface name corresponding to an
    interface index number.
    :exc:`OSError` if no interface with the given index exists.
 
index bd6b121f8dad5ad676c3105a18b29908d1dc8860..c9cb51896ee90a395a57b1dfdc65ff953a17ac6a 100644 (file)
@@ -41,7 +41,7 @@ The primary entry point is a :term:`generator`:
    returned as a :term:`named tuple` with the field names:
    ``type string start end line``.
 
-   The returned :term:`named tuple` has a additional property named
+   The returned :term:`named tuple` has an additional property named
    ``exact_type`` that contains the exact operator type for
    :data:`token.OP` tokens.  For all other token types ``exact_type``
    equals the named tuple ``type`` field.
index 1930f785a772776e82e373dd0afc9c2a50c01508..a8d9f53be06c264f2fb130e8caa690d4ba138d88 100644 (file)
@@ -464,7 +464,7 @@ Skipping tests and expected failures
 .. versionadded:: 3.1
 
 Unittest supports skipping individual test methods and even whole classes of
-tests.  In addition, it supports marking a test as a "expected failure," a test
+tests.  In addition, it supports marking a test as an "expected failure," a test
 that is broken and will fail, but shouldn't be counted as a failure on a
 :class:`TestResult`.
 
index cd4690faab41285c3efe6cfdeed6df8039a561b4..74f3c1f1428e077186829de56e82468470cbb6a7 100644 (file)
@@ -1322,7 +1322,7 @@ some point in the future.
     .. method:: retrieve(url, filename=None, reporthook=None, data=None)
 
        Retrieves the contents of *url* and places it in *filename*.  The return value
-       is a tuple consisting of a local filename and either a
+       is a tuple consisting of a local filename and either an
        :class:`email.message.Message` object containing the response headers (for remote
        URLs) or ``None`` (for local URLs).  The caller must then open and read the
        contents of *filename*.  If *filename* is not given and the URL refers to a
index dcd030cc12222ff3d1cb55059de271e479489776..6762e9177fe43fe807f697b13b22150cc0ac9889 100644 (file)
@@ -54,7 +54,7 @@ instead:
 
 .. function:: parseString(string, parser=None)
 
-   Return a :class:`Document` that represents the *string*. This method creates a
+   Return a :class:`Document` that represents the *string*. This method creates an
    :class:`io.StringIO` object for the string and passes that on to :func:`parse`.
 
 Both functions return a :class:`Document` object representing the content of the
index aea0e79b8b3fcfb1ace75abaae247a5a2375a1e7..230fdfed4ac428cb1d935e3f9e2f1f4f7dd4e4a5 100644 (file)
@@ -30,7 +30,7 @@ The available exception and functions in this module are:
 
 .. function:: adler32(data[, value])
 
-   Computes a Adler-32 checksum of *data*.  (An Adler-32 checksum is almost as
+   Computes an Adler-32 checksum of *data*.  (An Adler-32 checksum is almost as
    reliable as a CRC32 but can be computed much more quickly.)  If *value* is
    present, it is used as the starting value of the checksum; otherwise, a fixed
    default value is used.  This allows computing a running checksum over the
index fb0551e1add807084723a51863bdbd105f2bba90..3966cb43236535095e3ae8120594ab98a60580b2 100644 (file)
@@ -1118,7 +1118,7 @@ changes, or look through the Subversion logs for all the details.
   (Fixed by Daniel Stutzbach; :issue:`8729`.)
 
 * Constructors for the parsing classes in the :mod:`ConfigParser` module now
-  take a *allow_no_value* parameter, defaulting to false; if true,
+  take an *allow_no_value* parameter, defaulting to false; if true,
   options without values will be allowed.  For example::
 
     >>> import ConfigParser, StringIO
index 48379d9fc6650c95e9451ba5e72ce7483a2d1d25..094eff87dbdb8f61710244cc06d557d69a245156 100644 (file)
@@ -2155,7 +2155,7 @@ Major performance enhancements have been added:
   * encode an ASCII string to UTF-8 doesn't need to encode characters anymore,
     the UTF-8 representation is shared with the ASCII representation
   * the UTF-8 encoder has been optimized
-  * repeating a single ASCII letter and getting a substring of a ASCII strings
+  * repeating a single ASCII letter and getting a substring of an ASCII string
     is 4 times faster
 
 * UTF-8 is now 2x to 4x faster.  UTF-16 encoding is now up to 10x faster.
index d7b2acebdec418bd8c6710db04df1b7b71e13335..f19d9bf6415ff046ee44458de5c03374acbb7912 100644 (file)
@@ -965,7 +965,7 @@ _PyUnicodeWriter_WriteSubstring(_PyUnicodeWriter *writer,
     Py_ssize_t end
     );
 
-/* Append a ASCII-encoded byte string.
+/* Append an ASCII-encoded byte string.
    Return 0 on success, raise an exception and return -1 on error. */
 PyAPI_FUNC(int)
 _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
@@ -2041,7 +2041,7 @@ PyAPI_FUNC(PyObject *) PyUnicode_RichCompare(
     int op                      /* Operation: Py_EQ, Py_NE, Py_GT, etc. */
     );
 
-/* Apply a argument tuple or dictionary to a format string and return
+/* Apply an argument tuple or dictionary to a format string and return
    the resulting Unicode string. */
 
 PyAPI_FUNC(PyObject *) PyUnicode_Format(
index 0a8c0900f81f59705d2702856fa2c9a23bfa512c..9e08b6f88bcc2f570263a6f77b9968458e4f3c84 100644 (file)
@@ -349,7 +349,7 @@ class _SSLProtocolTransport(transports._FlowControlMixin,
         high-water limit.  Neither value can be negative.
 
         The defaults are implementation-specific.  If only the
-        high-water limit is given, the low-water limit defaults to a
+        high-water limit is given, the low-water limit defaults to an
         implementation-specific value less than or equal to the
         high-water limit.  Setting high to zero forces low to zero as
         well, and causes pause_writing() to be called whenever the
index 70b323f2db98836a2c3e54f1734638fc4c59436b..03099e3e54129c5aee5ecce57d539063a89ef617 100644 (file)
@@ -62,7 +62,7 @@ class WriteTransport(BaseTransport):
         high-water limit.  Neither value can be negative.
 
         The defaults are implementation-specific.  If only the
-        high-water limit is given, the low-water limit defaults to a
+        high-water limit is given, the low-water limit defaults to an
         implementation-specific value less than or equal to the
         high-water limit.  Setting high to zero forces low to zero as
         well, and causes pause_writing() to be called whenever the
index 4555ecd8b8a68df4652f6c309c1690dd476ca8fb..ee5b2128ea0fab1f645bbbb0ca1cae19affe0dc5 100644 (file)
@@ -30,7 +30,7 @@ class CallbackTracbackTestCase(unittest.TestCase):
     # value is printed correctly.
     #
     # Changed in 0.9.3: No longer is '(in callback)' prepended to the
-    # error message - instead a additional frame for the C code is
+    # error message - instead an additional frame for the C code is
     # created, then a full traceback printed.  When SystemExit is
     # raised in a callback function, the interpreter exits.
 
index 92ead538c5a3aa012b6b2350b49848d7b717f777..dbd34d28ffc72f1c52929e5017588a44531704e4 100644 (file)
@@ -1437,7 +1437,7 @@ class CookieJar:
                         break
                     # convert RFC 2965 Max-Age to seconds since epoch
                     # XXX Strictly you're supposed to follow RFC 2616
-                    #   age-calculation rules.  Remember that zero Max-Age is a
+                    #   age-calculation rules.  Remember that zero Max-Age
                     #   is a request to discard (old and new) cookie, though.
                     k = "expires"
                     v = self._now + v
index d4f99a38c7900bef5e1d94551dfaca5ebcf8fe49..f3f87085706f9a405d7366993d0443054dcf8493 100644 (file)
@@ -114,7 +114,7 @@ def find_metas(cls_node):
                 left_node = expr_node.children[0]
                 if isinstance(left_node, Leaf) and \
                         left_node.value == '__metaclass__':
-                    # We found a assignment to __metaclass__.
+                    # We found an assignment to __metaclass__.
                     fixup_simple_stmt(node, i, simple_node)
                     remove_trailing_newline(simple_node)
                     yield (node, i, simple_node)
index a9e167918a09ab4eb7f2cdc8cbbec41b30e0a4f7..70fe138b7c225c3f3379c5de3b3d4c9787a8297d 100644 (file)
@@ -733,7 +733,7 @@ _Validation_records = [
 ('CustomAction','Source','Y',None, None, None, None, 'CustomSource',None, 'The table reference of the source of the code.',),
 ('CustomAction','Target','Y',None, None, None, None, 'Formatted',None, 'Excecution parameter, depends on the type of custom action',),
 ('DrLocator','Signature_','N',None, None, None, None, 'Identifier',None, 'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-('DrLocator','Path','Y',None, None, None, None, 'AnyPath',None, 'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
+('DrLocator','Path','Y',None, None, None, None, 'AnyPath',None, 'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
 ('DrLocator','Depth','Y',0,32767,None, None, None, None, 'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
 ('DrLocator','Parent','Y',None, None, None, None, 'Identifier',None, 'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.',),
 ('DuplicateFile','File_','N',None, None, 'File',1,'Identifier',None, 'Foreign key referencing the source file to be duplicated.',),
index 6708876c04402b9159371efc35c54e70d02b0489..ebdcdad611166c3e20f1698bbd993892a6ad0f4f 100755 (executable)
@@ -27,7 +27,7 @@ python -E -Wd -m test [options] [test_name1 ...]
 EPILOG = """\
 Additional option details:
 
--r randomizes test execution order. You can use --randseed=int to provide a
+-r randomizes test execution order. You can use --randseed=int to provide an
 int seed value for the randomizer; this is useful for reproducing troublesome
 test orders.
 
index bd79728c34a665227c6f31739ae2297cb665fb8b..80feb903a94bca481f1943db7f2ee3400d457a54 100644 (file)
@@ -603,7 +603,7 @@ class DictTest(unittest.TestCase):
         # (D) subclass defines __missing__ method returning a value
         # (E) subclass defines __missing__ method raising RuntimeError
         # (F) subclass sets __missing__ instance variable (no effect)
-        # (G) subclass doesn't define __missing__ at a all
+        # (G) subclass doesn't define __missing__ at all
         class D(dict):
             def __missing__(self, key):
                 return 42
index f65440624f340105e8da756ec9e220da93e2d393..86cf8e144224b493e2408928ec8c3dcdf6405e2e 100644 (file)
@@ -15,7 +15,7 @@
 ################################################################################
 # When writing tests for io, it's important to test both the C and Python
 # implementations. This is usually done by writing a base test that refers to
-# the type it is testing as a attribute. Then it provides custom subclasses to
+# the type it is testing as an attribute. Then it provides custom subclasses to
 # test both implementations. This file has lots of examples.
 ################################################################################
 
index a92265d9e5bf98c1bcfbe383e9ad4f764073ab65..140b4be285ae1bee779ae2b269190181687315ec 100644 (file)
@@ -4651,7 +4651,7 @@ class TestUnixDomain(unittest.TestCase):
         except OSError as e:
             if str(e) == "AF_UNIX path too long":
                 self.skipTest(
-                    "Pathname {0!a} is too long to serve as a AF_UNIX path"
+                    "Pathname {0!a} is too long to serve as an AF_UNIX path"
                     .format(path))
             else:
                 raise
index e7fee55ad873e723dcad891b16384307a7d1c75d..3eb8801a7d6c7355366ba15c323df2beceb0642e 100644 (file)
@@ -171,7 +171,7 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
         # (D) subclass defines __missing__ method returning a value
         # (E) subclass defines __missing__ method raising RuntimeError
         # (F) subclass sets __missing__ instance variable (no effect)
-        # (G) subclass doesn't define __missing__ at a all
+        # (G) subclass doesn't define __missing__ at all
         class D(collections.UserDict):
             def __missing__(self, key):
                 return 42
index 21a560b5bfd19d6f637f236400040630fec98eac..75c40e56e897f0eace82ca5b4e57f8faa31b9749 100644 (file)
@@ -1117,7 +1117,7 @@ class Misc:
 
         return self._bind(('bind', className), sequence, func, add, 0)
     def unbind_class(self, className, sequence):
-        """Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE
+        """Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE
         all functions."""
         self.tk.call('bind', className , sequence, '')
     def mainloop(self, n=0):
index cf5d72fda7da465fe46ada1be25825ea686b5846..a9e2910ee69b6cbf8ddda512a9538ffd86b67c83 100644 (file)
@@ -12379,7 +12379,7 @@ Extension Modules
 
 - Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
 
-- Patch #1212117: os.stat().st_flags is now accessible as a attribute
+- Patch #1212117: os.stat().st_flags is now accessible as an attribute
   if available on the platform.
 
 - Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
index 8b26bd524fa3f743a20f40ee95962144ea071cdd..a7029a6bb750bcef13a7af504138e4d3e785245a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1008,7 +1008,7 @@ IDLE
   Changes are written to HOME/.idlerc/config-extensions.cfg.
   Original patch by Tal Einat.
 
-- Issue #16233: A module browser (File : Class Browser, Alt+C) requires a
+- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
   editor window with a filename.  When Class Browser is requested otherwise,
   from a shell, output window, or 'Untitled' editor, Idle no longer displays
   an error box.  It now pops up an Open Module box (Alt+M). If a valid name
index 4dc1534d46d4995ab783f661732eeaa474941970..9fe7a69655342336647f23691c799aa467425677 100644 (file)
@@ -2693,7 +2693,7 @@ load_verify_locations(PySSLContext *self, PyObject *args, PyObject *kwds)
             cadata_ascii = PyUnicode_AsASCIIString(cadata);
             if (cadata_ascii == NULL) {
                 PyErr_SetString(PyExc_TypeError,
-                                "cadata should be a ASCII string or a "
+                                "cadata should be an ASCII string or a "
                                 "bytes-like object");
                 goto error;
             }
index 4693fbcc51f086208aff8d9ff4aaf63299face5e..b86e74daf38519f0617c981c93030de5d09d6367 100644 (file)
@@ -1725,7 +1725,7 @@ PyDoc_STRVAR(starmap_doc,
 "starmap(function, sequence) --> starmap object\n\
 \n\
 Return an iterator whose values are returned from the function evaluated\n\
-with a argument tuple taken from the given sequence.");
+with an argument tuple taken from the given sequence.");
 
 static PyTypeObject starmap_type = {
     PyVarObject_HEAD_INIT(NULL, 0)
index e9281ad4427963067cd740aeb3bcbac9e9dbab57..6fc3683efcdc95a267939b731e6d5819ba33890d 100644 (file)
@@ -1703,7 +1703,7 @@ PyUnicode_Resize(PyObject **p_unicode, Py_ssize_t length)
     return unicode_resize(p_unicode, length);
 }
 
-/* Copy a ASCII or latin1 char* string into a Python Unicode string.
+/* Copy an ASCII or latin1 char* string into a Python Unicode string.
 
    WARNING: The function doesn't copy the terminating null character and
    doesn't check the maximum character (may write a latin1 character in an
@@ -7290,7 +7290,7 @@ error:
 }
 
 /*
- * Encode a Unicode string to a Windows code page into a byte string using a
+ * Encode a Unicode string to a Windows code page into a byte string using an
  * error handler.
  *
  * Returns consumed characters if succeed, or raise an OSError and returns