[Python-Dev] os.path.normcase() in site.py

Fred L. Drake, Jr. fdrake@acm.org
Mon, 25 Jun 2001 11:13:31 -0400 (EDT)


Guido van Rossum writes:
 > I can't think of any function besides the attempt to avoid duplicates.

  There were two reasons for adding this code:

    1.  Avoid duplicates (speeds imports if there are duplicates and
        the modules are found on an entry after the dupes).

    2.  Avoid breakage when a script uses os.chdir().  This is
        probably unusual for large applications, but fairly common for
        little admin helper scripts.

 > I think that even on Windows, retaining case makes sense.
 > 
 > I think that there's a way to avoid duplicates without case-folding
 > everything.  (E.g. use a case-folding comparison instead.)
 > 
 > I wonder if maybe path entries should be normpath'd though?
 > 
 > I'll leave it to Fred, Jack or Just to fix this.

  I certainly agree that this can be improved; if Jack or Just would
like to assign it to me on SourceForge, I'd be glad to fix it.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Digital Creations