This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Malcolm Smith, iritkatriel, lys.nikolaou, pitrou, serhiy.storchaka, xnovakj, xtreak
Date 2022-01-03.08:44:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641199482.13.0.63419476805.issue34931@roundup.psfhosted.org>
In-reply-to
Content
There are other issues with the documentation of splitext().

1. It uses term "extension" (it is even a part of function name), but it is vague and usually does not include a period. On Windows the extension of "python.exe" is "exe", not ".exe". On Unix term "suffix" is commonly used, ".exe" is a suffix. It is also used in pathlib. I suggest to replace "extension" with "suffix".

2. It is not specified that only the part of the last path component is included in the suffix, and leading periods of the last path component are ignored, not just leading periods of the path. So splitext('mail.dir/') == ('mail.dir/', '') and splitext('/home/user/.etc') is ('/home/user/.etc', ''). It is not documented that splitext() works with multi-component paths at all.
History
Date User Action Args
2022-01-03 08:44:42serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, xnovakj, Malcolm Smith, lys.nikolaou, xtreak, iritkatriel
2022-01-03 08:44:42serhiy.storchakasetmessageid: <1641199482.13.0.63419476805.issue34931@roundup.psfhosted.org>
2022-01-03 08:44:42serhiy.storchakalinkissue34931 messages
2022-01-03 08:44:41serhiy.storchakacreate