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
|
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
|
>>> p.drive
|
||||||
'c:'
|
'c:'
|
||||||
>>> p.root
|
>>> p.root
|
||||||
|
@ -372,9 +372,13 @@ Five simple properties are provided on every path (each can be empty)::
|
||||||
>>> p.anchor
|
>>> p.anchor
|
||||||
'c:\\'
|
'c:\\'
|
||||||
>>> p.name
|
>>> p.name
|
||||||
'setup.py'
|
'pathlib.tar.gz'
|
||||||
>>> p.ext
|
>>> p.basename
|
||||||
'.py'
|
'pathlib.tar'
|
||||||
|
>>> p.suffix
|
||||||
|
'.gz'
|
||||||
|
>>> p.suffixes
|
||||||
|
['.tar', '.gz']
|
||||||
|
|
||||||
|
|
||||||
Sequence-like access
|
Sequence-like access
|
||||||
|
|
Loading…
Reference in New Issue