[Python-checkins] peps: Simplify joinpath() example
antoine.pitrou
python-checkins at python.org
Fri Oct 25 21:10:05 CEST 2013
http://hg.python.org/peps/rev/d8511720bd92
changeset: 5219:d8511720bd92
user: Antoine Pitrou <solipsis at pitrou.net>
date: Fri Oct 25 21:05:22 2013 +0200
summary:
Simplify joinpath() example
files:
pep-0428.txt | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/pep-0428.txt b/pep-0428.txt
--- a/pep-0428.txt
+++ b/pep-0428.txt
@@ -406,12 +406,10 @@
>>> p / 'bar' / 'xyzzy'
PurePosixPath('foo/bar/xyzzy')
-A joinpath() method is also provided, with the same behaviour. It can serve
-as a factory function::
+A joinpath() method is also provided, with the same behaviour::
- >>> path_factory = p.joinpath
- >>> path_factory('bar')
- PurePosixPath('foo/bar')
+ >>> p.joinpath('Python')
+ PurePosixPath('foo/Python')
Changing the path's final component
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list