🔵 🔵 🔵


Primary

၊၊||၊|။

PurePath.name ⚬|Documentation|1st|20260122195929-00-⌔

pathlib — Object-oriented filesystem paths — Python 3.14.2 documentation#pathlib.PurePath.name

PurePath.name

A string representing the final path component, excluding the drive and root, if any:

>>> PurePosixPath('my/library/setup.py').name
'setup.py'

UNC drive names are not considered:

>>> PureWindowsPath('//some/share/setup.py').name
'setup.py'
>>> PureWindowsPath('//some/share').name
''

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •