(cherry picked from commit
51700bf08b0dd4baf998440b2ebfaa488a2855ba)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
>>> 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`.