.. attribute:: PurePath.suffix
- The file extension of the final component, if any::
+ The last dot-separated portion of the final component, if any::
>>> PurePosixPath('my/library/setup.py').suffix
'.py'
>>> PurePosixPath('my/library').suffix
''
+ This is commonly called the file extension.
.. attribute:: PurePath.suffixes
- A list of the path's file extensions::
+ A list of the path's suffixes, often called file extensions::
>>> PurePosixPath('my/library.tar.gar').suffixes
['.tar', '.gar']
.. data:: Path.suffix
- The file extension of the final component.
+ The last dot-separated portion of the final component, if any.
+ This is commonly called the file extension.
.. versionadded:: 3.11
Added :data:`Path.suffix` property.
.. data:: Path.suffixes
- A list of the path’s file extensions.
+ A list of the path’s suffixes, commonly called file extensions.
.. versionadded:: 3.11
Added :data:`Path.suffixes` property.