Replace ".ext" with ".suffix", and add the ".suffixes" property.
This commit is contained in:
parent
e449ea7094
commit
6c768f02a8
14
pep-0428.txt
14
pep-0428.txt
|
@ -362,9 +362,9 @@ call ``bytes()`` on it, or use the ``as_bytes()`` method::
|
|||
Properties
|
||||
----------
|
||||
|
||||
Five simple properties are provided on every path (each can be empty)::
|
||||
Six simple properties are provided on every path (each can be empty)::
|
||||
|
||||
>>> p = PureNTPath('c:/pathlib/setup.py')
|
||||
>>> p = PureNTPath('c:/Downloads/pathlib.tar.gz')
|
||||
>>> p.drive
|
||||
'c:'
|
||||
>>> p.root
|
||||
|
@ -372,9 +372,13 @@ Five simple properties are provided on every path (each can be empty)::
|
|||
>>> p.anchor
|
||||
'c:\\'
|
||||
>>> p.name
|
||||
'setup.py'
|
||||
>>> p.ext
|
||||
'.py'
|
||||
'pathlib.tar.gz'
|
||||
>>> p.basename
|
||||
'pathlib.tar'
|
||||
>>> p.suffix
|
||||
'.gz'
|
||||
>>> p.suffixes
|
||||
['.tar', '.gz']
|
||||
|
||||
|
||||
Sequence-like access
|
||||
|
|
Loading…
Reference in New Issue