mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
#7386: add example that shows that trailing path separators are stripped.
This commit is contained in:
parent
56be37cef2
commit
353ebce2a0
1 changed files with 3 additions and 1 deletions
|
@ -207,7 +207,9 @@ applications should use string objects to access all files.
|
|||
.. function:: normpath(path)
|
||||
|
||||
Normalize a pathname. This collapses redundant separators and up-level
|
||||
references so that ``A//B``, ``A/./B`` and ``A/foo/../B`` all become ``A/B``.
|
||||
references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all become
|
||||
``A/B``.
|
||||
|
||||
It does not normalize the case (use :func:`normcase` for that). On Windows, it
|
||||
converts forward slashes to backward slashes. It should be understood that this
|
||||
may change the meaning of the path if it contains symbolic links!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue