diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst --- a/Doc/library/email.policy.rst +++ b/Doc/library/email.policy.rst @@ -327,7 +327,7 @@ each resulting line to the ``max_line_length``. If ``cte_type`` is ``7bit``, non-ascii binary data is CTE encoded using the ``unknown-8bit`` charset. Otherwise the original source header is used, with its existing - line breaks and and any (RFC invalid) binary data it may contain. + line breaks and any (RFC invalid) binary data it may contain. .. note:: diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst --- a/Doc/library/ipaddress.rst +++ b/Doc/library/ipaddress.rst @@ -393,7 +393,7 @@ .. attribute:: is_link_local These attributes are true for the network as a whole if they are true - true for both the network address and the broadcast address + for both the network address and the broadcast address .. attribute:: network_address @@ -452,7 +452,7 @@ .. method:: overlaps(other) ``True`` if this network is partly or wholly contained in *other* or - or *other* is wholly contained in this network. + *other* is wholly contained in this network. .. method:: address_exclude(network) @@ -582,7 +582,7 @@ .. attribute:: is_site_local These attribute is true for the network as a whole if it is true - true for both the network address and the broadcast address + for both the network address and the broadcast address Operators diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -824,7 +824,7 @@ will not contain return meaningful values nor can they be called safely. The *server_name_callback* function must return ``None`` to allow the - the TLS negotiation to continue. If a TLS failure is required, a constant + TLS negotiation to continue. If a TLS failure is required, a constant :const:`ALERT_DESCRIPTION_* ` can be returned. Other return values will result in a TLS fatal error with :const:`ALERT_DESCRIPTION_INTERNAL_ERROR`. diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2637,7 +2637,7 @@ >>> z.nbytes 48 - Cast 1D/unsigned char to to 2D/unsigned long:: + Cast 1D/unsigned char to 2D/unsigned long:: >>> buf = struct.pack("L"*6, *list(range(6))) >>> x = memoryview(buf) diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1008,7 +1008,7 @@ you pass in `create=True`, and the attribute doesn't exist, patch will create the attribute for you when the patched function is called, and delete it again afterwards. This is useful for writing tests against - attributes that your production code creates at runtime. It is off by by + attributes that your production code creates at runtime. It is off by default because it can be dangerous. With it switched on you can write passing tests against APIs that don't actually exist! diff --git a/Include/pyport.h b/Include/pyport.h --- a/Include/pyport.h +++ b/Include/pyport.h @@ -881,7 +881,7 @@ /* * Convenient macros to deal with endianness of the platform. WORDS_BIGENDIAN is * detected by configure and defined in pyconfig.h. The code in pyconfig.h - * also also takes care of Apple's universal builds. + * also takes care of Apple's universal builds. */ #ifdef WORDS_BIGENDIAN diff --git a/Lib/argparse.py b/Lib/argparse.py --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1141,7 +1141,7 @@ - bufsize -- The file's desired buffer size. Accepts the same values as the builtin open() function. - encoding -- The file's encoding. Accepts the same values as the - the builtin open() function. + builtin open() function. - errors -- A string indicating how encoding and decoding errors are to be handled. Accepts the same value as the builtin open() function. """ diff --git a/Lib/email/_encoded_words.py b/Lib/email/_encoded_words.py --- a/Lib/email/_encoded_words.py +++ b/Lib/email/_encoded_words.py @@ -14,7 +14,7 @@ # cte (Content Transfer Encoding) is either 'q' or 'b' (ignoring case). In # theory other letters could be used for other encodings, but in practice this # (almost?) never happens. There could be a public API for adding entries -# to to the CTE tables, but YAGNI for now. 'q' is Quoted Printable, 'b' is +# to the CTE tables, but YAGNI for now. 'q' is Quoted Printable, 'b' is # Base64. The meaning of encoded_string should be obvious. 'lang' is optional # as indicated by the brackets (they are not part of the syntax) but is almost # never encountered in practice. diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -1863,7 +1863,7 @@ """ dtext = / obs-dtext obs-dtext = obs-NO-WS-CTL / quoted-pair - We allow anything except the excluded characters, but but if we find any + We allow anything except the excluded characters, but if we find any ASCII other than the RFC defined printable ASCII an NonPrintableDefect is added to the token's defects list. Quoted pairs are converted to their unquoted values, so what is returned is a ptext token, in this case a diff --git a/Lib/email/mime/text.py b/Lib/email/mime/text.py --- a/Lib/email/mime/text.py +++ b/Lib/email/mime/text.py @@ -26,7 +26,7 @@ Content-Transfer-Encoding header will also be set. """ - # If no _charset was specified, check to see see if there are non-ascii + # If no _charset was specified, check to see if there are non-ascii # characters present. If not, use 'us-ascii', otherwise use utf-8. # XXX: This can be removed once #7304 is fixed. if _charset is None: diff --git a/Lib/email/policy.py b/Lib/email/policy.py --- a/Lib/email/policy.py +++ b/Lib/email/policy.py @@ -23,7 +23,7 @@ """+ PROVISIONAL - The API extensions enabled by this this policy are currently provisional. + The API extensions enabled by this policy are currently provisional. Refer to the documentation for details. This policy adds new header parsing and folding algorithms. Instead of diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -4492,7 +4492,7 @@ x = Decimal(2**578) ** Decimal("-0.5") def test_py_immutability_operations(self): - # Do operations and check that it didn't change change internal objects. + # Do operations and check that it didn't change internal objects. Decimal = P.Decimal DefaultContext = P.DefaultContext setcontext = P.setcontext diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -3113,7 +3113,7 @@ def peer_create(self, newPathName, cnf={}, **kw): # new in Tk 8.5 """Creates a peer text widget with the given newPathName, and any optional standard configuration options. By default the peer will - have the same start and and end line as the parent widget, but + have the same start and end line as the parent widget, but these can be overriden with the standard configuration options.""" self.tk.call(self._w, 'peer', 'create', newPathName, *self._options(cnf, kw)) diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1444,7 +1444,7 @@ you pass in `create=True`, and the attribute doesn't exist, patch will create the attribute for you when the patched function is called, and delete it again afterwards. This is useful for writing tests against - attributes that your production code creates at runtime. It is off by by + attributes that your production code creates at runtime. It is off by default because it can be dangerous. With it switched on you can write passing tests against APIs that don't actually exist! diff --git a/Misc/HISTORY b/Misc/HISTORY --- a/Misc/HISTORY +++ b/Misc/HISTORY @@ -778,7 +778,7 @@ - Issue #14626: Large refactoring of functions / parameters in the os module. Many functions now support "dir_fd" and "follow_symlinks" parameters; - some also support accepting an open file descriptor in place of of a path + some also support accepting an open file descriptor in place of a path string. Added os.support_* collections as LBYL helpers. Removed many functions only previously seen in 3.3 alpha releases (often starting with "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka; @@ -1412,7 +1412,7 @@ - Issue #14399: zipfile now recognizes that the archive has been modified even if only the comment is changed. In addition, the TypeError that results from - trying to set a non-binary value as a comment is now now raised at the time + trying to set a non-binary value as a comment is now raised at the time the comment is set rather than at the time the zipfile is written. - trace.CoverageResults.is_ignored_filename() now ignores any name that starts @@ -3052,7 +3052,7 @@ check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the interpreter process. This could cause failures in non-Distutils subprocesses and was unreliable since tests or user programs could modify the interpreter - environment after Distutils set it. Instead, have Distutils set the the + environment after Distutils set it. Instead, have Distutils set the deployment target only in the environment of each build subprocess. It is still possible to globally override the default by setting MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3546,7 +3546,7 @@ the next header, it checks its (uninitialized) cmsg_len member to see if the "message" fits in the buffer, and returns NULL if it doesn't. Zero-filling the buffer - ensures that that doesn't happen. */ + ensures that this doesn't happen. */ memset(controlbuf, 0, controllen); for (i = 0; i < ncmsgbufs; i++) {