Message108208
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 |
|
Date |
User |
Action |
Args |
2010-06-19 20:00:55 | l0nwlf | set | recipients:
+ l0nwlf, pitrou, giampaolo.rodola, ezio.melotti, r.david.murray |
2010-06-19 20:00:55 | l0nwlf | set | messageid: <1276977655.35.0.854993397938.issue9018@psf.upfronthosting.co.za> |
2010-06-19 20:00:54 | l0nwlf | link | issue9018 messages |
2010-06-19 20:00:53 | l0nwlf | create | |
|