Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

Thanks for the report

> 1. For input ".blah." output is "." 

Please see issue35538

> 2. For input "..." output is "..." 

Please find the tests at 
https://github.com/python/cpython/blob/master/Lib/test/test_posixpath.py#L111

For completeness this is the behavior in master

./python.exe
Python 3.8.0a0 (heads/master:284b787612, Dec 23 2018, 23:11:33)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.splitext("...")
('...', '')
>>> os.path.splitext(".blah.")
('.blah', '.')

You can find links to other discussions in mailing list and other issues raised 
about this behavior at https://bugs.python.org/issue34931#msg328820 . Though 
this might be different from the behavior of guava I think this is something 
discussed extensively in the mailing list and finally to go with this behavior. 
So I don't think this is a bug but a behavior difference between guava and 
CPython implementation.

----------
nosy: +xtreak

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to