os.path.normcase rationale?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Tue Sep 21 02:02:49 CEST 2010

On Mon, 20 Sep 2010 19:45:37 +0100, Chris Withers wrote:

> Well, no, that doesn't feel right. Normalisation of case, for me, means
> "give me the case as the filesystem thinks it should be", 

What do you mean "the filesystem"?

If I look at the available devices on my system now, I see:

2 x FAT-32 filesystems
1 x ext2 filesystem
3 x ext3 filesystems
1 x NTFS filesystem
1 x UDF filesystem

and if I ever get my act together to install Basilisk II, as I've been 
threatening to do for the last five years, there will also be at least 
one 1 x HFS filesystem. Which one is "the" filesystem? 

If you are suggesting that os.path.normcase(filename) should determine 
which filesystem actually applies to filename at runtime, and hence work 
out what rules apply, what do you suggest should happen if the given path 
doesn't actually exist? What if it's a filesystem that the normpath 
developers haven't seen or considered before?


More information about the Python-list mailing list