Simplify joinpath() example
This commit is contained in:
parent
64210a6ec2
commit
3889008418
|
@ -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
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
Loading…
Reference in New Issue