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

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 21 03:33:30 CEST 2010


On 21/04/10 12:47, Mike Meyer wrote:
> if you have a way to make it case-sensitive, you're
> back where we started from: needing to figure out whether the files in
> question care about case.

It's not whether the *files* care about case, it's
whether the *application* cares about case.

For example, an application that deals with image
files should probably recognise .jpg, .JPG, .Jpg, etc.
as all meaning the same thing.

An application that deals with source files, on
the other hand, will probably want to distinguish
between .c and .C.

So I think it's likely that in any particular case,
the caller of hasextension() will know whether he
wants case-sensitivity or not.

-- 
Greg




More information about the Python-ideas mailing list