This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients eli.bendersky, larry, neologix, pitrou, python-dev
Date 2013-11-24.22:43:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAF-Rda-7EuT3q=DFgY9GxPZkai3AonwNhJx3FSs28nETK9r_sQ@mail.gmail.com>
In-reply-to <1385319355.2303.3.camel@fsol>
Content
>
>
> Antoine Pitrou added the comment:
>
> > Another question: What is the real purpose of pure paths? One thing I
> > see is using them to, say, manipulate Windows paths on a Posix machine
> > for some reason.
>
> Yes. Also, if some reason you want to be sure you're only doing path
> computations, not I/O.
>

"Sure" in what sense, like accidentally? IIUC path manipulation/computation
operations don't really call into the OS - only some methods do.

> > Any others? Could this also be achieved with just having Paths?
>
> I don't see how having just Paths would achieve this, unless you think
> it's sane to pretend to walk a Windows directory under Unix :-)
>

I mean, having Path, WindowsPath and PosixPath without the pure
counterparts. You usually use Path, but say you want to manipulate Windows
paths on a Linux box. So you instantiate a WindowsPath explicitly and do
your thing on it. You can't (NotImplementedError) call any methods that
would call into the OS, and that's it.

I'm just trying to look at the module from the POV of someone who sees it
for the first time, wondering "why do I have two kinds of things here, and
when would I want to use each? could I just use Path 99.9% of the time and
forget about the other options?". If that's true, we may want to reflect it
in the documentation explicitly - I believe this will make the module
easier to understand.
History
Date User Action Args
2013-11-24 22:43:49eli.benderskysetrecipients: + eli.bendersky, pitrou, larry, neologix, python-dev
2013-11-24 22:43:49eli.benderskylinkissue19673 messages
2013-11-24 22:43:49eli.benderskycreate