Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9748478

Browse files
committed
Issue #27306: Fix typo in tarfile documentation
Patch by Gareth Rees.
1 parent 48b5c98 commit 9748478

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Doc/library/tarfile.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,19 @@ Some facts and figures:
6464
| ``'x'`` or | Create a tarfile exclusively without |
6565
| ``'x:'`` | compression. |
6666
| | Raise an :exc:`FileExistsError` exception |
67-
| | if it is already exists. |
67+
| | if it already exists. |
6868
+------------------+---------------------------------------------+
6969
| ``'x:gz'`` | Create a tarfile with gzip compression. |
7070
| | Raise an :exc:`FileExistsError` exception |
71-
| | if it is already exists. |
71+
| | if it already exists. |
7272
+------------------+---------------------------------------------+
7373
| ``'x:bz2'`` | Create a tarfile with bzip2 compression. |
7474
| | Raise an :exc:`FileExistsError` exception |
75-
| | if it is already exists. |
75+
| | if it already exists. |
7676
+------------------+---------------------------------------------+
7777
| ``'x:xz'`` | Create a tarfile with lzma compression. |
7878
| | Raise an :exc:`FileExistsError` exception |
79-
| | if it is already exists. |
79+
| | if it already exists. |
8080
+------------------+---------------------------------------------+
8181
| ``'a' or 'a:'`` | Open for appending with no compression. The |
8282
| | file is created if it does not exist. |
@@ -148,8 +148,8 @@ Some facts and figures:
148148

149149
.. class:: TarFile
150150

151-
Class for reading and writing tar archives. Do not use this class directly,
152-
better use :func:`tarfile.open` instead. See :ref:`tarfile-objects`.
151+
Class for reading and writing tar archives. Do not use this class directly:
152+
use :func:`tarfile.open` instead. See :ref:`tarfile-objects`.
153153

154154

155155
.. function:: is_tarfile(name)
@@ -271,7 +271,7 @@ be finalized; only the internally used file object will be closed. See the
271271

272272
*mode* is either ``'r'`` to read from an existing archive, ``'a'`` to append
273273
data to an existing file, ``'w'`` to create a new file overwriting an existing
274-
one or ``'x'`` to create a new file only if it's not exists.
274+
one, or ``'x'`` to create a new file only if it does not already exist.
275275

276276
If *fileobj* is given, it is used for reading or writing data. If it can be
277277
determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used

0 commit comments

Comments
 (0)