summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-13 21:48:35 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-06-13 21:48:35 (GMT)
commit97484780863a94a33ac82c63a6c6ab0a53485277 (patch)
tree398b7b74500e7ebc69fec023a4df55d2788722a8
parent48b5c98e6e0139c24298f6ed7962da29d0f9cb89 (diff)
downloadcpython-97484780863a94a33ac82c63a6c6ab0a53485277.zip
cpython-97484780863a94a33ac82c63a6c6ab0a53485277.tar.gz
cpython-97484780863a94a33ac82c63a6c6ab0a53485277.tar.bz2
Issue #27306: Fix typo in tarfile documentation
Patch by Gareth Rees.
-rw-r--r--Doc/library/tarfile.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index 32d69bf..90a5852 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -64,19 +64,19 @@ Some facts and figures:
| ``'x'`` or | Create a tarfile exclusively without |
| ``'x:'`` | compression. |
| | Raise an :exc:`FileExistsError` exception |
- | | if it is already exists. |
+ | | if it already exists. |
+------------------+---------------------------------------------+
| ``'x:gz'`` | Create a tarfile with gzip compression. |
| | Raise an :exc:`FileExistsError` exception |
- | | if it is already exists. |
+ | | if it already exists. |
+------------------+---------------------------------------------+
| ``'x:bz2'`` | Create a tarfile with bzip2 compression. |
| | Raise an :exc:`FileExistsError` exception |
- | | if it is already exists. |
+ | | if it already exists. |
+------------------+---------------------------------------------+
| ``'x:xz'`` | Create a tarfile with lzma compression. |
| | Raise an :exc:`FileExistsError` exception |
- | | if it is already exists. |
+ | | if it already exists. |
+------------------+---------------------------------------------+
| ``'a' or 'a:'`` | Open for appending with no compression. The |
| | file is created if it does not exist. |
@@ -148,8 +148,8 @@ Some facts and figures:
.. class:: TarFile
- Class for reading and writing tar archives. Do not use this class directly,
- better use :func:`tarfile.open` instead. See :ref:`tarfile-objects`.
+ Class for reading and writing tar archives. Do not use this class directly:
+ use :func:`tarfile.open` instead. See :ref:`tarfile-objects`.
.. function:: is_tarfile(name)
@@ -271,7 +271,7 @@ be finalized; only the internally used file object will be closed. See the
*mode* is either ``'r'`` to read from an existing archive, ``'a'`` to append
data to an existing file, ``'w'`` to create a new file overwriting an existing
- one or ``'x'`` to create a new file only if it's not exists.
+ one, or ``'x'`` to create a new file only if it does not already exist.
If *fileobj* is given, it is used for reading or writing data. If it can be
determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used