[issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot

2019-10-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38624] pathlib .suffix, .suffixes, .stem unexpected behavior for pathname with trailing dot

2019-10-28 Thread Inyeol Lee
New submission from Inyeol Lee : Python3.8 pathlib treats dot between path stem and suffix as part of suffix in general: >>> a = pathlib.Path('foo.txt') >>> a.stem, a.suffix ('foo', '.txt') >>> a.with_suffix('') PosixPath('foo') However, if pathname ends with dot, it treats the trailing dot