homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author l0nwlf
Recipients ezio.melotti, giampaolo.rodola, l0nwlf, pitrou, r.david.murray
Date 2010年06月19日.20:00:53
SpamBayes Score 2.2948294e-05
Marked as misclassified No
Message-id <1276977655.35.0.854993397938.issue9018@psf.upfronthosting.co.za>
In-reply-to
Content
Following the documentation,
os.path.normcase(path)
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. On Windows, it also converts forward slashes to backward slashes.
on Mac OS X,
>>> import os
>>> os.name
'posix'
Checking through, Lib/posixpath.py,
# Normalize the case of a pathname. Trivial in Posix, string.lower on Mac.
# On MS-DOS this may also turn slashes into backslashes; however, other
# normalizations (such as optimizing '../' away) are not allowed 
# (another function should be defined to do that).
def normcase(s):
 """Normalize case of pathname. Has no effect under Posix"""
 # TODO: on Mac OS X, this should really return s.lower().
 return s
Why on Mac OS X, it should return s.lower() ?
Also to raise Error for None case we can probably change normcase() in Lib/posixpath.py as,
def normcase(s):
 """Normalize case of pathname. Has no effect under Posix"""
 if s is None: 
 raise AttributeError
 return s
History
Date User Action Args
2010年06月19日 20:00:55l0nwlfsetrecipients: + l0nwlf, pitrou, giampaolo.rodola, ezio.melotti, r.david.murray
2010年06月19日 20:00:55l0nwlfsetmessageid: <1276977655.35.0.854993397938.issue9018@psf.upfronthosting.co.za>
2010年06月19日 20:00:54l0nwlflinkissue9018 messages
2010年06月19日 20:00:53l0nwlfcreate

AltStyle によって変換されたページ (->オリジナル) /