Skip to content

Commit a6b610a

Browse files
docs: typo: tiny grammar change: "pointed by" -> "pointed to by" (#118411)
* docs: tiny grammar change: "pointed by" -> "pointed to by" This commit uses "file pointed to by" to replace "file pointed by" in - doc for shutil.copytree - docstring for shutil.copytree - docstring _abc.PathBase.open - docstring for pathlib.Path.open - doc for os.copy_file_range - doc for os.splice The docs use "file pointed to by" more frequently than "file pointed by". So, this commit replaces the uses of "file pointed by" in order to make the uses consistent through the docs. ```bash $ grep -ri 'pointed to by' cpython/ ``` yields more results than ```bash $ grep -ri 'pointed by' cpython/ ``` Separately: There are two occurrences of "tree pointed by": - cpython/Doc/library/xml.etree.elementtree.rst for `xml.etree.ElementInclude.include` - cpython/Lib/xml/etree/ElementInclude.py for `include` For those uses of "tree pointed by", I expect "tree pointed to by" instead. However, I found enough uses online of (a) "tree pointed by" rather than (b) "tree pointed to by" to convince me that (a) is in common use. So, this commit does not replace those occurrences of "tree pointed by" to "tree pointed to by". But I will replace them if a reviewer believes it is correct to replace them. * docs: typo: "exists and executable" -> "exists and is executable" --------- Co-authored-by: Andrew-Zipperer <[email protected]>
1 parent a37b093 commit a6b610a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Doc/library/os.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ as internal buffering of data.
926926
If *offset_src* is None, then *src* is read from the current position;
927927
respectively for *offset_dst*.
928928

929-
In Linux kernel older than 5.3, the files pointed by *src* and *dst*
929+
In Linux kernel older than 5.3, the files pointed to by *src* and *dst*
930930
must reside in the same filesystem, otherwise an :exc:`OSError` is
931931
raised with :attr:`~OSError.errno` set to :const:`errno.EXDEV`.
932932

@@ -1720,7 +1720,7 @@ or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windo
17201720
At least one of the file descriptors must refer to a pipe. If *offset_src*
17211721
is None, then *src* is read from the current position; respectively for
17221722
*offset_dst*. The offset associated to the file descriptor that refers to a
1723-
pipe must be ``None``. The files pointed by *src* and *dst* must reside in
1723+
pipe must be ``None``. The files pointed to by *src* and *dst* must reside in
17241724
the same filesystem, otherwise an :exc:`OSError` is raised with
17251725
:attr:`~OSError.errno` set to :const:`errno.EXDEV`.
17261726

Doc/library/shutil.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ Directory and files operations
242242
be copied as far as the platform allows; if false or omitted, the contents
243243
and metadata of the linked files are copied to the new tree.
244244

245-
When *symlinks* is false, if the file pointed by the symlink doesn't
245+
When *symlinks* is false, if the file pointed to by the symlink doesn't
246246
exist, an exception will be added in the list of errors raised in
247247
an :exc:`Error` exception at the end of the copy process.
248248
You can set the optional *ignore_dangling_symlinks* flag to true if you
@@ -447,7 +447,7 @@ Directory and files operations
447447
called. If no *cmd* would be called, return ``None``.
448448

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

452452
*path* is a "``PATH`` string" specifying the lookup directory list. When no
453453
*path* is specified, the results of :func:`os.environ` are used, returning

Lib/pathlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def is_junction(self):
540540
def open(self, mode='r', buffering=-1, encoding=None,
541541
errors=None, newline=None):
542542
"""
543-
Open the file pointed by this path and return a file object, as
543+
Open the file pointed to by this path and return a file object, as
544544
the built-in open() function does.
545545
"""
546546
if "b" not in mode:

Lib/pathlib/_abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def samefile(self, other_path):
637637
def open(self, mode='r', buffering=-1, encoding=None,
638638
errors=None, newline=None):
639639
"""
640-
Open the file pointed by this path and return a file object, as
640+
Open the file pointed to by this path and return a file object, as
641641
the built-in open() function does.
642642
"""
643643
raise UnsupportedOperation(self._unsupported_msg('open()'))

Lib/shutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
556556
If the optional symlinks flag is true, symbolic links in the
557557
source tree result in symbolic links in the destination tree; if
558558
it is false, the contents of the files pointed to by symbolic
559-
links are copied. If the file pointed by the symlink doesn't
559+
links are copied. If the file pointed to by the symlink doesn't
560560
exist, an exception will be added in the list of errors raised in
561561
an Error exception at the end of the copy process.
562562

0 commit comments

Comments
 (0)