Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
to fix the grammar.
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 11348b2..f022a4e 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -274,7 +274,7 @@
Even though IOBase does not declare read, readinto, or write because
their signatures will vary, implementations and clients should
consider those methods part of the interface. Also, implementations
- may raise a IOError when operations they do not support are called.
+ may raise an IOError when operations they do not support are called.
The basic type used for binary data read from or written to a file is
the bytes type. Method arguments may also be bytearray or memoryview of
diff --git a/Lib/chunk.py b/Lib/chunk.py
index 3e3b5a4..2d15abe 100644
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -21,7 +21,7 @@
usage of the Chunk class defined here is to instantiate an instance at
the start of each chunk and read from the instance until it reaches
the end, after which a new instance can be instantiated. At the end
-of the file, creating a new instance will fail with a EOFError
+of the file, creating a new instance will fail with an EOFError
exception.
Usage:
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 3d9be35..590238e 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -252,7 +252,7 @@
"""
def __init__(self, errors='strict'):
"""
- Creates a IncrementalDecoder instance.
+ Creates an IncrementalDecoder instance.
The IncrementalDecoder may use different error handling schemes by
providing the errors keyword argument. See the module docstring
@@ -1012,7 +1012,7 @@
"""
Encoding iterator.
- Encodes the input strings from the iterator using a IncrementalEncoder.
+ Encodes the input strings from the iterator using an IncrementalEncoder.
errors and kwargs are passed through to the IncrementalEncoder
constructor.
@@ -1030,7 +1030,7 @@
"""
Decoding iterator.
- Decodes the input strings from the iterator using a IncrementalDecoder.
+ Decodes the input strings from the iterator using an IncrementalDecoder.
errors and kwargs are passed through to the IncrementalDecoder
constructor.
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
index c72a249..258e138 100644
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -347,7 +347,7 @@
# class Mingw32CCompiler
# Because these compilers aren't configured in Python's pyconfig.h file by
-# default, we should at least warn the user if he is using a unmodified
+# default, we should at least warn the user if he is using an unmodified
# version.
CONFIG_H_OK = "ok"
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 449ce71..3739741 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -264,7 +264,7 @@
return self.voidcmd(cmd)
def sendeprt(self, host, port):
- '''Send a EPRT command with the current host and the given port number.'''
+ '''Send an EPRT command with the current host and the given port number.'''
af = 0
if self.af == socket.AF_INET:
af = 1
@@ -842,7 +842,7 @@
def parse229(resp, peer):
- '''Parse the '229' response for a EPSV request.
+ '''Parse the '229' response for an EPSV request.
Raises error_proto if it does not contain '(|||port|)'
Return ('host.addr.as.numbers', port#) tuple.'''
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 0c5b713..8a33719 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1384,7 +1384,7 @@
text.see("insert")
text.undo_block_stop()
- # Our editwin provides a is_char_in_string function that works
+ # Our editwin provides an is_char_in_string function that works
# with a Tk text index, but PyParse only knows about offsets into
# a string. This builds a function for PyParse that accepts an
# offset.
diff --git a/Lib/idlelib/ReplaceDialog.py b/Lib/idlelib/ReplaceDialog.py
index 9a9f74c..66a871a 100644
--- a/Lib/idlelib/ReplaceDialog.py
+++ b/Lib/idlelib/ReplaceDialog.py
@@ -59,7 +59,7 @@
def default_command(self, event=None):
if self.do_find(self.ok):
if self.do_replace(): # Only find next match if replace succeeded.
- # A bad re can cause a it to fail.
+ # A bad re can cause it to fail.
self.do_find(0)
def _replace_expand(self, m, repl):
diff --git a/Lib/io.py b/Lib/io.py
index 1438493..53ee102 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -19,7 +19,7 @@
Another IOBase subclass, TextIOBase, deals with the encoding and decoding
of streams into text. TextIOWrapper, which extends it, is a buffered text
interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
-is a in-memory stream for text.
+is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments
of open() are intended to be used as keyword arguments.
diff --git a/Lib/lib2to3/fixes/fix_input.py b/Lib/lib2to3/fixes/fix_input.py
index fbf4c72..728636b 100644
--- a/Lib/lib2to3/fixes/fix_input.py
+++ b/Lib/lib2to3/fixes/fix_input.py
@@ -17,7 +17,7 @@
"""
def transform(self, node, results):
- # If we're already wrapped in a eval() call, we're done.
+ # If we're already wrapped in an eval() call, we're done.
if context.match(node.parent.parent):
return
diff --git a/Lib/msilib/schema.py b/Lib/msilib/schema.py
index b84eb22..e132194 100644
--- a/Lib/msilib/schema.py
+++ b/Lib/msilib/schema.py
@@ -733,7 +733,7 @@
(u'CustomAction',u'Source',u'Y',None, None, None, None, u'CustomSource',None, u'The table reference of the source of the code.',),
(u'CustomAction',u'Target',u'Y',None, None, None, None, u'Formatted',None, u'Execution parameter, depends on the type of custom action',),
(u'DrLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
+(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'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.',),
(u'DrLocator',u'Depth',u'Y',0,32767,None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
(u'DrLocator',u'Parent',u'Y',None, None, None, None, u'Identifier',None, u'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.',),
(u'DuplicateFile',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key referencing the source file to be duplicated.',),
diff --git a/Lib/test/decimaltestdata/fma.decTest b/Lib/test/decimaltestdata/fma.decTest
index a8197ef..ee2a8d4 100644
--- a/Lib/test/decimaltestdata/fma.decTest
+++ b/Lib/test/decimaltestdata/fma.decTest
@@ -148,7 +148,7 @@
fmax2019 fma -9.999999 9.999999 0E+999999 -> -100.000 Inexact Rounded
fmax2020 fma -9.999999 -9.999999 0E+999999 -> 100.000 Inexact Rounded
--- 1999.12.21: next one is a edge case if intermediate longs are used
+-- 1999.12.21: next one is an edge case if intermediate longs are used
precision: 15
fmax2059 fma 999999999999 9765625 0E+999999 -> 9.76562499999023E+18 Inexact Rounded
precision: 30
diff --git a/Lib/test/decimaltestdata/multiply.decTest b/Lib/test/decimaltestdata/multiply.decTest
index 6a23d5a..e8bd77a 100644
--- a/Lib/test/decimaltestdata/multiply.decTest
+++ b/Lib/test/decimaltestdata/multiply.decTest
@@ -49,7 +49,7 @@
mulx019 multiply -9.999999999 9.999999999 -> -100.000 Inexact Rounded
mulx020 multiply -9.999999999 -9.999999999 -> 100.000 Inexact Rounded
--- 1999.12.21: next one is a edge case if intermediate longs are used
+-- 1999.12.21: next one is an edge case if intermediate longs are used
precision: 15
mulx059 multiply 999999999999 9765625 -> 9.76562499999023E+18 Inexact Rounded
precision: 30
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 57c7c88..fb34893 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -649,7 +649,7 @@
except OSError as e:
self.assertEqual(e.errno, errno.EBADF)
else:
- self.fail("%r didn't raise a OSError with a bad file descriptor"
+ self.fail("%r didn't raise an OSError with a bad file descriptor"
% f)
@unittest.skipUnless(hasattr(os, 'isatty'), 'test needs os.isatty()')
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 85f9965..89c5719 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -196,7 +196,7 @@
# The exponential backoff of the timeout amounts to a total
# of ~1 second after which the deletion is probably an error
# anyway.
- # Testing on a i7@4.3GHz shows that usually only 1 iteration is
+ # Testing on an i7@4.3GHz shows that usually only 1 iteration is
# required when contention occurs.
timeout = 0.001
while timeout < 1.0:
diff --git a/Lib/xmlrpclib.py b/Lib/xmlrpclib.py
index e072f71..b0e7485 100644
--- a/Lib/xmlrpclib.py
+++ b/Lib/xmlrpclib.py
@@ -970,7 +970,7 @@
"unexpected type in multicall result"
class MultiCall:
- """server -> a object used to boxcar method calls
+ """server -> an object used to boxcar method calls
server should be a ServerProxy object.
@@ -1334,7 +1334,7 @@
##
# Create parser.
#
- # @return A 2-tuple containing a parser and a unmarshaller.
+ # @return A 2-tuple containing a parser and an unmarshaller.
def getparser(self):
# get parser and unmarshaller