[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 returns ('.blah','.')

--
resolution: not a bug -> 
status: closed -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 filepath ending  in .
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com