On Sat, Sep 18, 2010 at 2:39 PM, Chris Withers <ch...@simplistix.co.uk> wrote:
> I'm curious as to why, with a file called "Foo.txt" on a case descriminating
> but case insensitive filesystem, os.path.normcase('FoO.txt') will return
> "foo.txt" rather than "Foo.txt"?
>
> Yes, I know the behaviour is documented, but I'm wondering if anyone can
> remember the rationale for that behaviour?

Because normcase() and friends never look at the filesystem. Of
course, exists() and isdir() etc. do, and so does realpath(), but the
pure parsing functions don't. They can be used without a working
filesystem even. (E.g. you can import ntpath on a Unix box and happily
parse Windows paths.)

-- 
--Guido van Rossum (python.org/~guido)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to