Message327346
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? |
|
Date |
User |
Action |
Args |
2018-10-08 12:06:01 | xnovakj | set | recipients:
+ xnovakj |
2018-10-08 12:06:01 | xnovakj | set | messageid: <1539000361.1.0.545547206417.issue34931@psf.upfronthosting.co.za> |
2018-10-08 12:06:01 | xnovakj | link | issue34931 messages |
2018-10-08 12:06:00 | xnovakj | create | |
|