On Wed, Nov 20, 2013 at 4:49 AM, Antoine Pitrou <solip...@pitrou.net> wrote:

> On Wed, 20 Nov 2013 12:25:20 +0000
> Garth Bushell <ga...@garthy.com> wrote:
> >
> > I'm also quite uneasy on the case insensitive comparison on Windows as
> the
> > File system NTFS is case sensitive.
> >
> > """Current Windows file systems, like NTFS, are case-sensitive; that is a
> > readme.txt and a Readme.txt can exist in the same directory. Windows
> > disallows the user to create a second file differing only in case due to
> > compatibility issues with older software not designed for such
> > operation."""  (http://en.wikipedia.org/wiki/Case_sensitivity)
>
> Well the path class is named WindowsPath, not NTFSPath. In other words,
> it embodies path semantics as exposed by the Windows system and API,
> not what NTFS is able to do. Having per-filesystem concrete path
> classes would quickly grow of control (do we need a separate class for
> FAT32 filesystems? what if Windows later switches to another
> filesystem?).
>
> The PEP already points to a corresponding discussion:
> http://www.python.org/dev/peps/pep-0428/#case-sensitivity
>
> > If people create .PY files it wouldn't work on Linux so why make it work
> on
> > windows?
>
> What do you mean with "work"?
> What I know is that if I save a something.PY file under Windows and then
> double-click on it in the Explorer, it will be launched with the Python
> interpreter.
>

Also, let's not forget that apart from comparison (Path('a') == Path('A')),
matching and globbing, the WindowsPath class does not normalize the case of
pathname components (only slash vs. backslash, redundant [back]slashes, and
redundant '.' components are handled). So if you are in the unusual
circumstances where you have to use case-sensitive paths on Windows, you
can still use WindowsPath.

-- 
--Guido van Rossum (python.org/~guido)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to