diff options
author | Martin Panter <vadmium+py@gmail.com> | 2015-11-02 03:37:02 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2015-11-02 03:37:02 (GMT) |
commit | b362f75f6e5d8fe21d0cda740f9dcdf1976091f7 (patch) | |
tree | 1b7f020b0403e2378879af5c7e3cdeba27990dc2 | |
parent | 8c6849bfe6ccc0e508e23df385b4ca61c7e00236 (diff) | |
download | cpython-b362f75f6e5d8fe21d0cda740f9dcdf1976091f7.zip cpython-b362f75f6e5d8fe21d0cda740f9dcdf1976091f7.tar.gz cpython-b362f75f6e5d8fe21d0cda740f9dcdf1976091f7.tar.bz2 |
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.
52 files changed, 68 insertions, 68 deletions
diff --git a/Demo/tix/INSTALL.txt b/Demo/tix/INSTALL.txt index ac70b68..c598e40 100644 --- a/Demo/tix/INSTALL.txt +++ b/Demo/tix/INSTALL.txt @@ -4,7 +4,7 @@ Installing Tix.py ---------------- 0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.1.1) and Python (V2.1.1). - Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2 + Tix.py has been written and tested on an Intel Pentium running RH Linux 5.2 and Mandrake Linux 7.0 and Windows with the above mentioned packages. Older versions, e.g. Tix 4.1 and Tk 8.0, might also work. diff --git a/Doc/howto/sorting.rst b/Doc/howto/sorting.rst index 675ed97..7da2d43 100644 --- a/Doc/howto/sorting.rst +++ b/Doc/howto/sorting.rst @@ -90,7 +90,7 @@ Operator Module Functions The key-function patterns shown above are very common, so Python provides convenience functions to make accessor functions easier and faster. The operator module has :func:`operator.itemgetter`, :func:`operator.attrgetter`, and -starting in Python 2.5 a :func:`operator.methodcaller` function. +starting in Python 2.5 an :func:`operator.methodcaller` function. Using those functions, the above examples become simpler and faster: diff --git a/Doc/library/chunk.rst b/Doc/library/chunk.rst index 04c7e27..d31fa0a 100644 --- a/Doc/library/chunk.rst +++ b/Doc/library/chunk.rst @@ -48,7 +48,7 @@ Usually an IFF-type file consists of one or more chunks. The proposed usage of the :class:`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 :exc:`EOFError` exception. +instance will fail with an :exc:`EOFError` exception. .. class:: Chunk(file[, align, bigendian, inclheader]) diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index ead6b7a..c6bf3ef 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -276,7 +276,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. generating the delta lines) in unified diff format. Unified diffs are a compact way of showing just the lines that have changed plus - a few lines of context. The changes are shown in a inline style (instead of + a few lines of context. The changes are shown in an inline style (instead of separate before/after blocks). The number of context lines is set by *n* which defaults to three. diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 3ab7b3b..b155daf 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -283,9 +283,9 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. .. method:: FTP.transfercmd(cmd[, rest]) - Initiate a transfer over the data connection. If the transfer is active, send a + Initiate a transfer over the data connection. If the transfer is active, send an ``EPRT`` or ``PORT`` command and the transfer command specified by *cmd*, and - accept the connection. If the server is passive, send a ``EPSV`` or ``PASV`` + accept the connection. If the server is passive, send an ``EPSV`` or ``PASV`` command, connect to it, and start the transfer command. Either way, return the socket for the connection. diff --git a/Doc/library/io.rst b/Doc/library/io.rst index d3cdbf1..633a6af 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -221,7 +221,7 @@ I/O Base Classes Even though :class:`IOBase` does not declare :meth:`read`, :meth:`readinto`, or :meth:`write` because their signatures will vary, implementations and clients should consider those methods part of the interface. Also, - implementations may raise a :exc:`IOError` when operations they do not + implementations may raise an :exc:`IOError` when operations they do not support are called. The basic type used for binary data read from or written to a file is diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst index dfb43a1..c1ed15b 100644 --- a/Doc/library/optparse.rst +++ b/Doc/library/optparse.rst @@ -1327,7 +1327,7 @@ where the input parameters are the list of arguments to process (default: ``sys.argv[1:]``) ``values`` - a :class:`optparse.Values` object to store option arguments in (default: a + an :class:`optparse.Values` object to store option arguments in (default: a new instance of :class:`Values`) -- if you give an existing object, the option defaults will not be initialized on it diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index 5d7edd1..99a36af 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -256,7 +256,7 @@ the :mod:`glob` module.) .. function:: samefile(path1, path2) Return ``True`` if both pathname arguments refer to the same file or directory - (as indicated by device number and i-node number). Raise an exception if a + (as indicated by device number and i-node number). Raise an exception if an :func:`os.stat` call on either pathname fails. Availability: Unix. diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index 5b2808d..b6e7689 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -22,7 +22,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). .. class:: SMTP([host[, port[, local_hostname[, timeout]]]]) - A :class:`SMTP` instance encapsulates an SMTP connection. It has methods + An :class:`SMTP` instance encapsulates an SMTP connection. It has methods that support a full repertoire of SMTP and ESMTP operations. If the optional host and port parameters are given, the SMTP :meth:`connect` method is called with those parameters during initialization. If specified, @@ -45,7 +45,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). .. class:: SMTP_SSL([host[, port[, local_hostname[, keyfile[, certfile[, timeout]]]]]]) - A :class:`SMTP_SSL` instance behaves exactly the same as instances of + An :class:`SMTP_SSL` instance behaves exactly the same as instances of :class:`SMTP`. :class:`SMTP_SSL` should be used for situations where SSL is required from the beginning of the connection and using :meth:`starttls` is not appropriate. If *host* is not specified, the local host is used. If diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index f79eba6..73b5d5c 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -757,7 +757,7 @@ correspond to Unix system calls applicable to sockets. Set blocking or non-blocking mode of the socket: if *flag* is 0, the socket is set to non-blocking, else to blocking mode. Initially all sockets are in blocking mode. In non-blocking mode, if a :meth:`recv` call doesn't find any - data, or if a :meth:`send` call can't immediately dispose of the data, a + data, or if a :meth:`send` call can't immediately dispose of the data, an :exc:`error` exception is raised; in blocking mode, the calls block until they can proceed. ``s.setblocking(0)`` is equivalent to ``s.settimeout(0.0)``; ``s.setblocking(1)`` is equivalent to ``s.settimeout(None)``. diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index f897234d..2b730e8 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -583,7 +583,7 @@ Cursor Objects .. attribute:: lastrowid This read-only attribute provides the rowid of the last modified row. It is - only set if you issued a ``INSERT`` statement using the :meth:`execute` + only set if you issued an ``INSERT`` statement using the :meth:`execute` method. For operations other than ``INSERT`` or when :meth:`executemany` is called, :attr:`lastrowid` is set to :const:`None`. diff --git a/Doc/library/sunau.rst b/Doc/library/sunau.rst index 4bdb99b..5d57d4b 100644 --- a/Doc/library/sunau.rst +++ b/Doc/library/sunau.rst @@ -54,8 +54,8 @@ The :mod:`sunau` module defines the following functions: Note that it does not allow read/write files. - A *mode* of ``'r'`` returns a :class:`AU_read` object, while a *mode* of ``'w'`` - or ``'wb'`` returns a :class:`AU_write` object. + A *mode* of ``'r'`` returns an :class:`AU_read` object, while a *mode* of ``'w'`` + or ``'wb'`` returns an :class:`AU_write` object. .. function:: openfp(file, mode) diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst index f74b89f..03c5713 100644 --- a/Doc/library/webbrowser.rst +++ b/Doc/library/webbrowser.rst @@ -20,7 +20,7 @@ available. If text-mode browsers are used, the calling process will block until the user exits the browser. If the environment variable :envvar:`BROWSER` exists, it is interpreted to -override the platform default list of browsers, as a :data:`os.pathsep`-separated +override the platform default list of browsers, as an :data:`os.pathsep`-separated list of browsers to try in order. When the value of a list part contains the string ``%s``, then it is interpreted as a literal browser command line to be used with the argument URL substituted for ``%s``; if the part does not contain diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 9e62dfc..3f3b30f 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1418,7 +1418,7 @@ Basic customization will not be usable in hashed collections. If a class defines mutable objects and implements a :meth:`__cmp__` or :meth:`__eq__` method, it should not implement :meth:`__hash__`, since hashable collection implementations require - that a object's hash value is immutable (if the object's hash value changes, + that an object's hash value is immutable (if the object's hash value changes, it will be in the wrong hash bucket). User-defined classes have :meth:`__cmp__` and :meth:`__hash__` methods diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index f93a544..9787e6b 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -345,7 +345,7 @@ example:: A *finally clause* is always executed before leaving the :keyword:`try` statement, whether an exception has occurred or not. When an exception has occurred in the :keyword:`try` clause and has not been handled by an -:keyword:`except` clause (or it has occurred in a :keyword:`except` or +:keyword:`except` clause (or it has occurred in an :keyword:`except` or :keyword:`else` clause), it is re-raised after the :keyword:`finally` clause has been executed. The :keyword:`finally` clause is also executed "on the way out" when any other clause of the :keyword:`try` statement is left via a diff --git a/Doc/whatsnew/2.1.rst b/Doc/whatsnew/2.1.rst index d25e48d..f756506 100644 --- a/Doc/whatsnew/2.1.rst +++ b/Doc/whatsnew/2.1.rst @@ -555,7 +555,7 @@ will include metadata, making it possible to build automated cataloguing systems and experiment with them. With the result experience, perhaps it'll be possible to design a really good catalog and then build support for it into Python 2.2. For example, the Distutils :command:`sdist` and :command:`bdist_\*` commands -could support a ``upload`` option that would automatically upload your +could support an ``upload`` option that would automatically upload your package to a catalog server. You can start creating packages containing :file:`PKG-INFO` even if you're not diff --git a/Include/abstract.h b/Include/abstract.h index 78a1825..6ccda66 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -94,7 +94,7 @@ Proposal numeric, sequence, and mapping. Each protocol consists of a collection of related operations. If an operation that is not provided by a particular type is invoked, then a standard exception, - NotImplementedError is raised with a operation name as an argument. + NotImplementedError is raised with an operation name as an argument. In addition, for convenience this interface defines a set of constructors for building objects of built-in types. This is needed so new objects can be returned from C functions that otherwise treat diff --git a/Include/codecs.h b/Include/codecs.h index 8a9041b..851bc9f 100644 --- a/Include/codecs.h +++ b/Include/codecs.h @@ -146,14 +146,14 @@ PyAPI_FUNC(PyObject *) PyCodec_Decoder( const char *encoding ); -/* Get a IncrementalEncoder object for the given encoding. */ +/* Get an IncrementalEncoder object for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder( const char *encoding, const char *errors ); -/* Get a IncrementalDecoder object function for the given encoding. */ +/* Get an IncrementalDecoder object function for the given encoding. */ PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder( const char *encoding, 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 @@ class IOBase: 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 @@ Usually an IFF-type file consists of one or more chunks. The proposed 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 @@ class IncrementalDecoder(object): """ 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 @@ def iterencode(iterator, encoding, errors='strict', **kwargs): """ 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 @@ def iterdecode(iterator, encoding, errors='strict', **kwargs): """ 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 (CygwinCCompiler): # 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 @@ class FTP: 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 parse227(resp): 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 @@ class EditorWindow(object): 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 @@ class ReplaceDialog(SearchDialogBase): 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): @@ -19,7 +19,7 @@ streams. BytesIO is a simple stream of in-memory bytes. 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 @@ class FixInput(fixer_base.BaseFix): """ 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 @@ _Validation_records = [ (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 @@ fmax2018 fma 9.999999 -9.999999 0E+999999 -> -100.000 Inexact Rounded 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 @@ mulx018 multiply 9.999999999 -9.999999999 -> -100.000 Inexact Rounded 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 @@ class TestInvalidFD(unittest.TestCase): 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 @@ if sys.platform.startswith("win"): # 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 @@ class MultiCallIterator: "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 @@ class Transport: ## # 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 diff --git a/Misc/HISTORY b/Misc/HISTORY index fa0c623..ae5c643 100644 --- a/Misc/HISTORY +++ b/Misc/HISTORY @@ -388,7 +388,7 @@ Core and builtins ----------------- - Bug #1441486: The literal representation of -(sys.maxint - 1) - again evaluates to a int object, not a long. + again evaluates to an int object, not a long. - Bug #1501934: The scope of global variables that are locally assigned using augmented assignment is now correctly determined. @@ -4295,7 +4295,7 @@ Core and builtins interpreter executions, would fail. - "%c" % u"a" now returns a unicode string instead of raising a - TypeError. u"%c" % 0xffffffff now raises a OverflowError instead + TypeError. u"%c" % 0xffffffff now raises an OverflowError instead of a ValueError to be consistent with "%c" % 256. See SF patch #710127. Extension modules @@ -12193,7 +12193,7 @@ no longer use the default root. - The interfaces for the bind*() and unbind() widget methods have been redesigned; the bind*() methods now return the name of the Tcl command -created for the callback, and this can be passed as a optional +created for the callback, and this can be passed as an optional argument to unbind() in order to delete the command (normally, such commands are automatically unbound when the widget is destroyed, but for some applications this isn't enough). @@ -1324,7 +1324,7 @@ Library - Issue #22530: Allow the ``group()`` method of regular expression match objects to take a ``long`` as an index. -- Issue #22517: When a io.BufferedRWPair object is deallocated, clear its +- Issue #22517: When an io.BufferedRWPair object is deallocated, clear its weakrefs. - Issue #10510: distutils register and upload methods now use HTML standards @@ -2989,7 +2989,7 @@ Core and Builtins created with PyFile_FromString(). - Issue #14474: Save and restore exception state in thread.start_new_thread() - while writing error message if the thread leaves a unhandled exception. + while writing error message if the thread leaves an unhandled exception. - Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch by Suman Saha. @@ -3965,7 +3965,7 @@ Core and Builtins - Issues #12610 and #12609: Verify that user generated AST has correct string and identifier types before compiling. -- Issue #11627: Fix segfault when __new__ on a exception returns a +- Issue #11627: Fix segfault when __new__ on an exception returns a non-exception class. - Issue #12149: Update the method cache after a type's dictionnary gets @@ -4281,7 +4281,7 @@ Library - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. -- Issue #4376: ctypes now supports nested structures in a endian different than +- Issue #4376: ctypes now supports nested structures in an endian different than the parent structure. Patch by Vlad Riscutia. - Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors @@ -6697,7 +6697,7 @@ Library - Issue #7610: Reworked implementation of the internal ``zipfile.ZipExtFile`` class used to represent files stored inside an archive. The new - implementation is significantly faster and can be wrapped in a + implementation is significantly faster and can be wrapped in an ``io.BufferedReader`` object for more speedups. It also solves an issue where interleaved calls to ``read()`` and ``readline()`` give wrong results. Patch by Nir Aides. @@ -7952,7 +7952,7 @@ Library mulitiprocessing.manager so that users can install custom handlers/etc. - Issue #3551: Patch multiprocessing to raise a proper exception if the size of - the object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES. Added + the object when writefile is called causes an ERROR_NO_SYSTEM_RESOURCES. Added docs to note the limitation. - unittest.assertNotEqual() now uses the inequality operator (!=) instead of the diff --git a/Misc/cheatsheet b/Misc/cheatsheet index 3e603fc..0867079 100644 --- a/Misc/cheatsheet +++ b/Misc/cheatsheet @@ -953,7 +953,7 @@ dir([object]) localsymbol table. With a module, class or class instanceobject as arg, returns list of names in its attr. dict. divmod(a,b) Returns tuple of (a/b, a%b) -enumerate(seq) Return a iterator giving: (0, seq[0]), (1, seq[1]), ... +enumerate(seq) Return an iterator giving: (0, seq[0]), (1, seq[1]), ... eval(s[, globals[, Eval string s in (optional) globals, locals contexts.s must locals]]) have no NUL's or newlines. s can also be acode object. Example: x = 1; incr_x = eval('x + 1') diff --git a/Modules/_ctypes/libffi/src/x86/darwin64.S b/Modules/_ctypes/libffi/src/x86/darwin64.S index 2f7394e..0c72ed2 100644 --- a/Modules/_ctypes/libffi/src/x86/darwin64.S +++ b/Modules/_ctypes/libffi/src/x86/darwin64.S @@ -350,7 +350,7 @@ LASFDE1: .set L$set$3,LUW1-LUW0 .long L$set$3 - /* New stack frame based off rbp. This is a itty bit of unwind + /* New stack frame based off rbp. This is an itty bit of unwind trickery in that the CFA *has* changed. There is no easy way to describe it correctly on entry to the function. Fortunately, it doesn't matter too much since at all points we can correctly diff --git a/Modules/_ctypes/libffi/src/x86/unix64.S b/Modules/_ctypes/libffi/src/x86/unix64.S index dcd6bc7..45a0ed7 100644 --- a/Modules/_ctypes/libffi/src/x86/unix64.S +++ b/Modules/_ctypes/libffi/src/x86/unix64.S @@ -366,7 +366,7 @@ ffi_closure_unix64: .byte 0x4 /* DW_CFA_advance_loc4 */ .long .LUW1-.LUW0 - /* New stack frame based off rbp. This is a itty bit of unwind + /* New stack frame based off rbp. This is an itty bit of unwind trickery in that the CFA *has* changed. There is no easy way to describe it correctly on entry to the function. Fortunately, it doesn't matter too much since at all points we can correctly diff --git a/Modules/_ctypes/libffi_osx/x86/darwin64.S b/Modules/_ctypes/libffi_osx/x86/darwin64.S index 165d469..1286d33 100644 --- a/Modules/_ctypes/libffi_osx/x86/darwin64.S +++ b/Modules/_ctypes/libffi_osx/x86/darwin64.S @@ -351,7 +351,7 @@ LASFDE1: .set L$set$3,LUW1-LUW0 .long L$set$3 - /* New stack frame based off rbp. This is a itty bit of unwind + /* New stack frame based off rbp. This is an itty bit of unwind trickery in that the CFA *has* changed. There is no easy way to describe it correctly on entry to the function. Fortunately, it doesn't matter too much since at all points we can correctly diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 01f4577..ad336c7 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -730,7 +730,7 @@ _openssl_hash_name_mapper(const OBJ_NAME *openssl_obj_name, void *arg) if (openssl_obj_name == NULL) return; /* Ignore aliased names, they pollute the list and OpenSSL appears to - * have a its own definition of alias as the resulting list still + * have its own definition of alias as the resulting list still * contains duplicate and alternate names for several algorithms. */ if (openssl_obj_name->alias) return; diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index 04c4445..bbfea71 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -74,7 +74,7 @@ PyDoc_STRVAR(module_doc, "Another IOBase subclass, TextIOBase, deals with the encoding and decoding\n" "of streams into text. TextIOWrapper, which extends it, is a buffered text\n" "interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO\n" -"is a in-memory stream for text.\n" +"is an in-memory stream for text.\n" "\n" "Argument names are not part of the specification, and only the arguments\n" "of open() are intended to be used as keyword arguments.\n" diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c index 710ada4..5f7b345 100644 --- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -35,7 +35,7 @@ PyDoc_STRVAR(iobase_doc, "Even though IOBase does not declare read, readinto, or write because\n" "their signatures will vary, implementations and clients should\n" "consider those methods part of the interface. Also, implementations\n" - "may raise a IOError when operations they do not support are called.\n" + "may raise an IOError when operations they do not support are called.\n" "\n" "The basic type used for binary data read from or written to a file is\n" "the bytes type. Method arguments may also be bytearray or memoryview\n" diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 38bb0d8..a95edce 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -881,8 +881,8 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds) if (self->encoding == NULL) { catch_ImportError: /* - Importing locale can raise a ImportError because of - _functools, and locale.getpreferredencoding can raise a + Importing locale can raise an ImportError because of + _functools, and locale.getpreferredencoding can raise an ImportError if _locale is not available. These will happen during module building. */ diff --git a/Modules/audioop.c b/Modules/audioop.c index e829e4d..a4d1375 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -121,7 +121,7 @@ static PyInt16 _st_ulaw2linear16[256] = { /* * linear2ulaw() accepts a 14-bit signed integer and encodes it as u-law data - * stored in a unsigned char. This function should only be called with + * stored in an unsigned char. This function should only be called with * the data shifted such that it only contains information in the lower * 14-bits. * diff --git a/Modules/expat/pyexpatns.h b/Modules/expat/pyexpatns.h index 2f2f4f9..999c5c7 100644 --- a/Modules/expat/pyexpatns.h +++ b/Modules/expat/pyexpatns.h @@ -21,7 +21,7 @@ * * * The Solution: - * Prefix all a exported symbols with "PyExpat_". This is similar to + * Prefix all exported symbols with "PyExpat_". This is similar to * what Mozilla does for some common libs: * http://lxr.mozilla.org/seamonkey/source/modules/libimg/png/mozpngconf.h#115 * diff --git a/Modules/readline.c b/Modules/readline.c index 3bb0ac8..6091a68 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -1144,7 +1144,7 @@ call_readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt) return NULL; } - /* We got an EOF, return a empty string. */ + /* We got an EOF, return an empty string. */ if (p == NULL) { p = PyMem_Malloc(1); if (p != NULL) diff --git a/Objects/abstract.c b/Objects/abstract.c index 3a50b73..2cb34b7 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1641,7 +1641,7 @@ PyNumber_Int(PyObject *o) } return res; } - if (PyInt_Check(o)) { /* A int subclass without nb_int */ + if (PyInt_Check(o)) { /* An int subclass without nb_int */ PyIntObject *io = (PyIntObject*)o; return PyInt_FromLong(io->ob_ival); } diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 057900d..44c82e4 100644 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -148,7 +148,7 @@ msvcrt_get_osfhandle(PyObject *self, PyObject *args) if (handle == -1) return PyErr_SetFromErrno(PyExc_IOError); - /* technically 'handle' is not a pointer, but a integer as + /* technically 'handle' is not a pointer, but an integer as large as a pointer, Python's *VoidPtr interface is the most appropriate here */ return PyLong_FromVoidPtr((void*)handle); diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile index bf2e486..613da64 100644 --- a/PC/os2emx/Makefile +++ b/PC/os2emx/Makefile @@ -102,7 +102,7 @@ ifeq ($(FIXED_PYHOME),yes) CFLAGS+= -DPREFIX=$(DQUOTE)$(LIB_DIR)$(DQUOTE) endif -# We're using the OMF format since EMX's ld has a obscure bug +# We're using the OMF format since EMX's ld has an obscure bug # because of which it sometimes fails to build relocations # in .data segment that point to another .data locations # (except for the final linking if the .EXEs) diff --git a/Python/thread.c b/Python/thread.c index c54670d..3b69f96 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -50,7 +50,7 @@ threads. This is valid for HP-UX 11.23 running on an ia64 system. If needed, add - a check of __ia64 to verify that we're running on a ia64 system instead + a check of __ia64 to verify that we're running on an ia64 system instead of a pa-risc system. */ #ifdef __hpux diff --git a/Tools/msi/schema.py b/Tools/msi/schema.py index b3032f8..523c836 100644 --- a/Tools/msi/schema.py +++ b/Tools/msi/schema.py @@ -733,7 +733,7 @@ _Validation_records = [ (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/Tools/msi/uisample.py b/Tools/msi/uisample.py index 456d9ae..d6c256b 100644 --- a/Tools/msi/uisample.py +++ b/Tools/msi/uisample.py @@ -998,7 +998,7 @@ _Validation = [ (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.'), |