diff options
author | William Woodruff <william@yossarian.net> | 2020-01-22 21:24:16 -0500 |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2020-01-22 18:24:16 -0800 |
commit | dd754caf144009f0569dda5053465ba2accb7b4d (patch) | |
tree | 536217d96dcb3e1d5f57b0bcd53da66059a15ad3 /Doc/library | |
parent | 41f0ef6abbd304409c55612a08788cdd59fbc8a3 (diff) | |
download | cpython-git-dd754caf144009f0569dda5053465ba2accb7b4d.tar.gz |
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/library')
-rw-r--r-- | Doc/library/tarfile.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index c34f2c4a57..459e4ad991 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: |