From 6c768f02a8933b62e193e398c99745d61066ff9a Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 10 Oct 2012 20:34:57 +0200 Subject: [PATCH] Replace ".ext" with ".suffix", and add the ".suffixes" property. --- pep-0428.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pep-0428.txt b/pep-0428.txt index 253bcf60a..7560e93a4 100644 --- a/pep-0428.txt +++ b/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