summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorWilliam Woodruff <william@yossarian.net>2020-01-23 02:24:16 (GMT)
committerEthan Furman <ethan@stoneleaf.us>2020-01-23 02:24:16 (GMT)
commitdd754caf144009f0569dda5053465ba2accb7b4d (patch)
tree536217d96dcb3e1d5f57b0bcd53da66059a15ad3 /Doc
parent41f0ef6abbd304409c55612a08788cdd59fbc8a3 (diff)
downloadcpython-dd754caf144009f0569dda5053465ba2accb7b4d.zip
cpython-dd754caf144009f0569dda5053465ba2accb7b4d.tar.gz
cpython-dd754caf144009f0569dda5053465ba2accb7b4d.tar.bz2
bpo-29435: Allow is_tarfile to take a filelike obj (GH-18090)
`is_tarfile()` now supports `name` being a file or file-like object.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/tarfile.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index c34f2c4..459e4ad 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -159,7 +159,10 @@ Some facts and figures:
.. function:: is_tarfile(name)
Return :const:`True` if *name* is a tar archive file, that the :mod:`tarfile`
- module can read.
+ module can read. *name* may be a :class:`str`, file, or file-like object.
+
+ .. versionchanged:: 3.9
+ Support for file and file-like objects.
The :mod:`tarfile` module defines the following exceptions: