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