[issue35538] splitext does not seems to handle filepath ending in .

2018-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not a bug. The current behavior is consistent and unsurprising. -- nosy: +serhiy.storchaka resolution: -> not a bug status: pending -> closed ___ Python tracker

[issue35538] splitext does not seems to handle filepath ending in .

2018-12-19 Thread Devika Sondhi
Devika Sondhi added the comment: Linux (unlike Windows) allows naming a file with a trailing dot. The issue with file name such as '.blah.' is that it does not have an extension and one would expect the base-name without extension to be returned as '.blah.' and not as '.blah' splitext

[issue35538] splitext does not seems to handle filepath ending in .

2018-12-19 Thread Matthew Barnett
Matthew Barnett added the comment: It always returns the dot. For example: >>> posixpath.splitext('.blah.txt') ('.blah', '.txt') If there's no extension (no dot): >>> posixpath.splitext('blah') ('blah', '') Not a bug. -- nosy: +mrabarnett resolution: -> not a bug stage: ->

[issue35538] splitext does not seems to handle filepath ending in .

2018-12-19 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Is this similar to previous discussions about leading and trailing dots ? https://bugs.python.org/issue34931#msg328820 -- nosy: +xtreak ___ Python tracker

[issue35538] splitext does not seems to handle filepath ending in .

2018-12-19 Thread Devika Sondhi
New submission from Devika Sondhi : posixpath.splitext('.blah.') returns ('.blah', '.') while the expectation was to return an empty extension at the end. -- messages: 332157 nosy: Devika Sondhi priority: normal severity: normal status: open title: splitext does not seems to handle