Skip to content

Commit 6a7b3a7

Browse files
Issue #26778: Fixed "a/an/and" typos in code comment and documentation.
1 parent 50dd1f7 commit 6a7b3a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+88
-87
lines changed

Doc/c-api/set.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ or :class:`frozenset` or instances of their subtypes.
128128
of brand new frozensets before they are exposed to other code). Return 0 on
129129
success or -1 on failure. Raise a :exc:`TypeError` if the *key* is
130130
unhashable. Raise a :exc:`MemoryError` if there is no room to grow. Raise a
131-
:exc:`SystemError` if *set* is an not an instance of :class:`set` or its
131+
:exc:`SystemError` if *set* is not an instance of :class:`set` or its
132132
subtype.
133133
134134
@@ -142,15 +142,15 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
142142
error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a
143143
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard`
144144
method, this function does not automatically convert unhashable sets into
145-
temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is an not an
145+
temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is not an
146146
instance of :class:`set` or its subtype.
147147
148148
149149
.. c:function:: PyObject* PySet_Pop(PyObject *set)
150150
151151
Return a new reference to an arbitrary object in the *set*, and removes the
152152
object from the *set*. Return *NULL* on failure. Raise :exc:`KeyError` if the
153-
set is empty. Raise a :exc:`SystemError` if *set* is an not an instance of
153+
set is empty. Raise a :exc:`SystemError` if *set* is not an instance of
154154
:class:`set` or its subtype.
155155
156156

Doc/c-api/unicode.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ These APIs can be used to work with surrogates:
367367
368368
.. c:macro:: Py_UNICODE_IS_HIGH_SURROGATE(ch)
369369
370-
Check if *ch* is an high surrogate (``0xD800 <= ch <= 0xDBFF``).
370+
Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``).
371371
372372
.. c:macro:: Py_UNICODE_IS_LOW_SURROGATE(ch)
373373
@@ -450,7 +450,7 @@ APIs:
450450
| :attr:`%%` | *n/a* | The literal % character. |
451451
+-------------------+---------------------+--------------------------------+
452452
| :attr:`%c` | int | A single character, |
453-
| | | represented as an C int. |
453+
| | | represented as a C int. |
454454
+-------------------+---------------------+--------------------------------+
455455
| :attr:`%d` | int | Exactly equivalent to |
456456
| | | ``printf("%d")``. |

Doc/distutils/apiref.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ selection by :class:`MSVCCompiler`.
837837
.. module:: distutils.bcppcompiler
838838

839839

840-
This module provides :class:`BorlandCCompiler`, an subclass of the abstract
840+
This module provides :class:`BorlandCCompiler`, a subclass of the abstract
841841
:class:`CCompiler` class for the Borland C++ compiler.
842842

843843

Doc/library/asyncio-eventloop.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ Low-level socket operations
513513

514514
The *address* must be already resolved to avoid the trap of hanging the
515515
entire event loop when the address requires doing a DNS lookup. For
516-
example, it must be an IP address, not an hostname, for
516+
example, it must be an IP address, not a hostname, for
517517
:py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
518518
Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
519519

Doc/library/ctypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ positive integer::
671671

672672
TenPointsArrayType = POINT * 10
673673

674-
Here is an example of an somewhat artificial data type, a structure containing 4
674+
Here is an example of a somewhat artificial data type, a structure containing 4
675675
POINTs among other stuff::
676676

677677
>>> from ctypes import *
@@ -1888,7 +1888,7 @@ Utility functions
18881888
.. function:: POINTER(type)
18891889

18901890
This factory function creates and returns a new ctypes pointer type. Pointer
1891-
types are cached an reused internally, so calling this function repeatedly is
1891+
types are cached and reused internally, so calling this function repeatedly is
18921892
cheap. *type* must be a ctypes type.
18931893

18941894

Doc/library/idle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Find Selection
128128
Search for the currently selected string, if there is one.
129129

130130
Find in Files...
131-
Open a file search dialog. Put results in an new output window.
131+
Open a file search dialog. Put results in a new output window.
132132

133133
Replace...
134134
Open a search-and-replace dialog.

Doc/library/shutil.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Directory and files operations
342342
Return the path to an executable which would be run if the given *cmd* was
343343
called. If no *cmd* would be called, return ``None``.
344344

345-
*mode* is a permission mask passed a to :func:`os.access`, by default
345+
*mode* is a permission mask passed to :func:`os.access`, by default
346346
determining if the file exists and executable.
347347

348348
When no *path* is specified, the results of :func:`os.environ` are used,

Doc/library/tarfile.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Some facts and figures:
129129
| ``'r|bz2'`` | Open a bzip2 compressed *stream* for |
130130
| | reading. |
131131
+-------------+--------------------------------------------+
132-
| ``'r|xz'`` | Open a lzma compressed *stream* for |
132+
| ``'r|xz'`` | Open an lzma compressed *stream* for |
133133
| | reading. |
134134
+-------------+--------------------------------------------+
135135
| ``'w|'`` | Open an uncompressed *stream* for writing. |

Doc/library/tkinter.tix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ File Selectors
267267

268268
The `ExFileSelectBox
269269
<http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixExFileSelectBox.htm>`_
270-
widget is usually embedded in a tixExFileSelectDialog widget. It provides an
270+
widget is usually embedded in a tixExFileSelectDialog widget. It provides a
271271
convenient method for the user to select files. The style of the
272272
:class:`ExFileSelectBox` widget is very similar to the standard file dialog on
273273
MS Windows 3.1.

Doc/tutorial/datastructures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ objects, such as lists.
397397

398398
Though tuples may seem similar to lists, they are often used in different
399399
situations and for different purposes.
400-
Tuples are :term:`immutable`, and usually contain an heterogeneous sequence of
400+
Tuples are :term:`immutable`, and usually contain a heterogeneous sequence of
401401
elements that are accessed via unpacking (see later in this section) or indexing
402402
(or even by attribute in the case of :func:`namedtuples <collections.namedtuple>`).
403403
Lists are :term:`mutable`, and their elements are usually homogeneous and are

0 commit comments

Comments
 (0)