[Python-ideas] Small enhancement to os.path.splitext

Bruce Leban bruce at leapyear.org
Fri Apr 23 16:21:06 CEST 2010


Also note that there are really THREE variations:

Case sensitive (Unix/mac normally)
Case preserving (windows normally)
Case insensitive (some legacy fs)

IMHO gcc treating .c and .C is annoying. I usually get .JPG instead of .jpg
when windows apps pick the extension for me. Also annoying.

Notwithstanding that you can't do case insensitive compare without knowing
the file system locale otherwise .GIF != .gif. So this is a mess.

Furthermore it's not just extensions. Some names are conventionally case
sensitive. And if I write #include "foo.h" and have foo.h and FOO.h you
better get the right one. If I'm filtering unsafe filetypes are .EXE and .PL
unsafe?

Probably most useful is to provide access to fs locale and case sensitivety
mode and leave rest for now.

--- Bruce
(via android)

On Apr 23, 2010 4:49 AM, "Paul Moore" <p.f.moore at gmail.com> wrote:

On 23 April 2010 12:34, Lie Ryan <lie.1296 at gmail.com> wrote:
> On 04/23/10 17:50, Paul Moore wrote:
...
:-)

Good point. Which I guess boils down to saying that if there's no
consensus, then nothing should be added to the stdlib (which is a
conclusion I'm happy with).

Paul.

_______________________________________________
Python-ideas mailing list
Python-ideas at python.org
ht...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100423/c25050f3/attachment.html>


More information about the Python-ideas mailing list