[New-bugs-announce] [issue6840] genericpath: _splitext returns '.ext', '' instead of '', '.ext'

Alexandru Munteanu report at bugs.python.org
Fri Sep 4 23:31:44 CEST 2009


New submission from Alexandru Munteanu <io_fx at yahoo.fr>:

Having a '.ogg' filename, _splitext returns '.ogg' as base and empty
extension. Probably it should return empty base and '.ogg' extension.

Lib/genericpath.py:99 - Why "skip all leading dots" ?

I attach a possible patch (with tests).

----------
components: Library (Lib)
files: genericpath_splitext.patch
keywords: patch
messages: 92267
nosy: optimix
severity: normal
status: open
title: genericpath: _splitext returns '.ext', '' instead of '', '.ext'
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file14834/genericpath_splitext.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6840>
_______________________________________


More information about the New-bugs-announce mailing list