[Python-Dev] PEP 355 status

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Oct 27 01:12:20 CEST 2006


Talin wrote:
> It seems that any Python program that manipulated paths 
> would have to be radically different in the environment that you describe.

I can sympathise with that. The problem is really
inherent in the nature of the platforms -- it's
just not possible to do everything in a native
classic MacOS way and be cross-platform at the
same time. There has to be a compromise somewhere.

With classic MacOS the compromise was usually to
use pathnames and to heck with the consequences.
You could get away with it most of the time.

> In other words, what you are describing isn't IMHO a 
> path at all, but it is like a path in that it describes how to get to a 
> file.

Yes, that's true. Calling it a "path" would be
something of a historical misnomer.

> An alternative approach is to try and come up with an encoding scheme 
> that allows you to represent all of that platform-specific semantics in 
> a string.

Yes, I thought of that, too. That's what you would
have to do under the current scheme if you ever
encountered a platform which truly had no textual
representation of file locations.

But realistically, it seems unlikely that such a
platform will be invented in the foreseeable future
(even classic MacOS *had* a notion of paths, even
if it wasn't the preferred representation). So
all this is probably YAGNI.

--
Greg


More information about the Python-Dev mailing list