Simplify joinpath() example

This commit is contained in:
Antoine Pitrou 2013-10-25 21:05:22 +02:00
parent 64210a6ec2
commit 3889008418
1 changed files with 3 additions and 5 deletions

View File

@ -406,12 +406,10 @@ collapsed or separately::
>>> 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^