Replace ".ext" with ".suffix", and add the ".suffixes" property.

This commit is contained in:
Antoine Pitrou 2012-10-10 20:34:57 +02:00
parent e449ea7094
commit 6c768f02a8
1 changed files with 9 additions and 5 deletions

View File

@ -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