classification
Title: os.path.normcase documentation confusing
Type: behavior Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: chris.jerdonek, docs@python, iritkatriel, r.david.murray, serhiy.storchaka
Priority: normal Keywords:

Created on 2014-12-18 12:02 by chris.jerdonek, last changed 2021-06-21 12:57 by iritkatriel. This issue is now closed.

Messages (6)
msg232871 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2014-12-18 12:02
The documentation for os.path.normcase(path) is currently confusing or self-contradictory.

Currently, it reads--

"Normalize the case of a pathname. On Unix and Mac OS X, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase."

However, with a case-insensitive file system on Mac OS X (e.g. "File System Personality: Journaled HFS+"), normcase() does not convert paths to lowercase.

As it stands, it seems like the clause "on case-insensitive filesystems, it converts the path to lowercase" should be removed or further qualified.  I don't know what the qualification is though.
msg232872 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-12-18 12:16
s/on case-insensitive filesystems/on Windows/ ?
msg232873 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-12-18 12:18
... and OS/2 (in 2.7).
msg232879 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2014-12-18 14:17
Or would s/case-insensitive/not case-preserving/ be more accurate?  (Well, you'd probably rewrite the sentence to eliminate the 'not').
msg232881 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-12-18 14:46
> Or would s/case-insensitive/not case-preserving/ be more accurate?  (Well,
> you'd probably rewrite the sentence to eliminate the 'not').

This would not be more accurate because behavior depends from OS, not from file 
system. On Unix/Linux your can mount case-insensitive filesystem, but 
normcase() doesn't know anything about this.
msg396242 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-06-21 12:57
This has been fixed by now: https://docs.python.org/3/library/os.path.html#os.path.normpath
History
Date User Action Args
2021-06-21 12:57:25iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg396242

resolution: fixed
stage: resolved
2014-12-18 14:46:41serhiy.storchakasetmessages: + msg232881
2014-12-18 14:17:33r.david.murraysetnosy: + r.david.murray
messages: + msg232879
2014-12-18 12:18:34serhiy.storchakasetmessages: + msg232873
2014-12-18 12:16:09serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg232872
2014-12-18 12:02:11chris.jerdonekcreate