`parent` is now a property returning the logical parent of the path
This commit is contained in:
parent
046c7012df
commit
c7f8d92125
|
@ -484,14 +484,11 @@ Windows paths handle the drive and the root as a single path component::
|
|||
|
||||
(separating them would be wrong, since ``C:`` is not the parent of ``C:\\``).
|
||||
|
||||
The ``parent()`` method returns an ancestor of the path::
|
||||
The ``parent`` property returns the logical parent of the path::
|
||||
|
||||
>>> p.parent()
|
||||
>>> p = PureWindowsPath('c:/python33/bin/python.exe')
|
||||
>>> p.parent
|
||||
PureWindowsPath('c:/python33/bin')
|
||||
>>> p.parent(2)
|
||||
PureWindowsPath('c:/python33')
|
||||
>>> p.parent(3)
|
||||
PureWindowsPath('c:/')
|
||||
|
||||
The ``parents`` property returns an immutable sequence of the path's
|
||||
logical ancestors::
|
||||
|
|
Loading…
Reference in New Issue