[Python-ideas] filename comparison [was] Re: PEP 428 - object-oriented filesystem paths

Nick Coghlan ncoghlan at gmail.com
Tue Oct 16 08:01:51 CEST 2012

On Tue, Oct 16, 2012 at 6:21 AM, Jim Jewett <jimjjewett at gmail.com> wrote:
> Ideally, I would also have a way to find out that a pathname is likely
> to be problematic for cross-platform uses, or at least whether two
> specific pathnames are known to be collision-prone on existing
> platforms other than mine.  (But I'm not sure that sort of test can be
> reliable enough for the stdlib.  Would just check for caseless
> equality, reserved Windows names, and non-alphanumeric characters in
> the filename?)

I'd forgotten about it until reading this, but I think you can get
into trouble with Unicode normalisation as well - so, I think we can
safely dismiss this as an irrelevant tangent and just stick with
Antoine's basic Windows vs Posix distinction. If need be, the
strategies can be exposed at a later date (via keyword-only arguments)
if we come up with a more convincing use case.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list