[Python-checkins] peps: Replace ".ext" with ".suffix", and add the ".suffixes" property.
antoine.pitrou
python-checkins at python.org
Wed Oct 10 20:36:32 CEST 2012
http://hg.python.org/peps/rev/86d69edb5de8
changeset: 4547:86d69edb5de8
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Oct 10 20:34:57 2012 +0200
summary:
Replace ".ext" with ".suffix", and add the ".suffixes" property.
files:
pep-0428.txt | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/pep-0428.txt b/pep-0428.txt
--- a/pep-0428.txt
+++ b/pep-0428.txt
@@ -362,9 +362,9 @@
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 @@
>>> 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
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list