diff options
author | Miguel Brito <5544985+miguendes@users.noreply.github.com> | 2021-05-14 17:57:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 17:57:36 (GMT) |
commit | dc0b364de46cec104dae62282174b6c8a1cdb475 (patch) | |
tree | 8709a8ec9e07ef69dbea195e55d65d919966f781 /Doc/library | |
parent | 2918846a4ff394237ccd7c6d5cdf5655e2ddd726 (diff) | |
download | cpython-dc0b364de46cec104dae62282174b6c8a1cdb475.zip cpython-dc0b364de46cec104dae62282174b6c8a1cdb475.tar.gz cpython-dc0b364de46cec104dae62282174b6c8a1cdb475.tar.bz2 |
bpo-44095: Add suffix, stem and suffixes to zipfile.Path (GH-26129)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/zipfile.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 3db55e6..42fe27b 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -521,6 +521,27 @@ Path objects are traversable using the ``/`` operator or ``joinpath``. Return ``True`` if the current context references a file or directory in the zip file. +.. data:: Path.suffix + + The file extension of the final component. + + .. versionadded:: 3.11 + Added :data:`Path.suffix` property. + +.. data:: Path.stem + + The final path component, without its suffix. + + .. versionadded:: 3.11 + Added :data:`Path.stem` property. + +.. data:: Path.suffixes + + A list of the path’s file extensions. + + .. versionadded:: 3.11 + Added :data:`Path.suffixes` property. + .. method:: Path.read_text(*, **) Read the current file as unicode text. Positional and |