summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/os.path.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index a66b3c5..6b15a11 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -501,11 +501,16 @@ the :mod:`glob` module.)
>>> splitext('foo.bar.exe')
('foo.bar', '.exe')
+ >>> splitext('/foo/bar.exe')
+ ('/foo/bar', '.exe')
- Leading periods on the basename are ignored::
+ Leading periods of the last component of the path are considered to
+ be part of the root::
>>> splitext('.cshrc')
('.cshrc', '')
+ >>> splitext('/foo/....jpg')
+ ('/foo/....jpg', '')
.. versionchanged:: 3.6
Accepts a :term:`path-like object`.