Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add docs and news
  • Loading branch information
miguendes committed May 14, 2021
commit 1190276fad80a0e058a956a5a7ef114cc1ea32be
21 changes: 21 additions & 0 deletions Doc/library/zipfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:class:`zipfile.Path` now supports :attr:`zipfile.Path.stem`,
:attr:`zipfile.Path.suffixes`, and :attr:`zipfile.Path.suffix` attributes.