diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-08-21 07:01:16 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-08-21 07:01:16 (GMT) |
commit | a7eb74627826e389dd78bd5a7a3b0878f4e3dde6 (patch) | |
tree | c0b9b7c3d2da3fc8945e7a31b59aebaead0c9cc1 /Doc/library | |
parent | 48ad7c0b01de1be182c3894e1691861ccffb82ea (diff) | |
download | cpython-a7eb74627826e389dd78bd5a7a3b0878f4e3dde6.zip cpython-a7eb74627826e389dd78bd5a7a3b0878f4e3dde6.tar.gz cpython-a7eb74627826e389dd78bd5a7a3b0878f4e3dde6.tar.bz2 |
Issue #21549: Added the "members" parameter to TarFile.list().
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/tarfile.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index 15b88f8..3adb633 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -325,11 +325,15 @@ be finalized; only the internally used file object will be closed. See the returned by :meth:`getmembers`. -.. method:: TarFile.list(verbose=True) +.. method:: TarFile.list(verbose=True, *, members=None) Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`, only the names of the members are printed. If it is :const:`True`, output - similar to that of :program:`ls -l` is produced. + similar to that of :program:`ls -l` is produced. If optional *members* is + given, it must be a subset of the list returned by :meth:`getmembers`. + + .. versionchanged:: 3.5 + Added the *members* parameter. .. method:: TarFile.next() |