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 xnovakj
Recipients xnovakj
Date 2018-10-08.12:06:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za>
In-reply-to
Content
There are some old tickets about changing splitext() in 2007:
https://bugs.python.org/issue1115886
https://bugs.python.org/issue1681842

Present python documentation:
Leading periods on the basename are ignored; splitext('.cshrc') returns ('.cshrc', '').
Changed in version 2.6: Earlier versions could produce an empty root when the only period was the first character.

But nobody take care about more than one dots:
For example this possible corect filenames:

>>> os.path.splitext('....jpg')
('....jpg', '')

So present function is insuficient (buggy) to use to detect right extension.
Maybe new parameter would be helpfull for that?
Like parameter "preserve_dotfiles" discussed in 2007.

And what to do with the wrong '.', '..', '...', ... filenames?
History
Date User Action Args
2018-10-08 12:06:01xnovakjsetrecipients: + xnovakj
2018-10-08 12:06:01xnovakjsetmessageid: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za>
2018-10-08 12:06:01xnovakjlinkissue34931 messages
2018-10-08 12:06:00xnovakjcreate