[Python-ideas] PEP 428 - object-oriented filesystem paths
Ethan Furman
ethan at stoneleaf.us
Tue Oct 9 18:37:09 CEST 2012
Greg Ewing wrote:
> Nick Coghlan wrote:
>
>> Moving from "os.path.join(a, b, c, d, e)" (or, the way I often write
>> it, "joinpath(a, b, c, d, e)") to "a.joinpath(b, c, d, e)" at least
>> isn't going backwards, and is more obvious in isolation than "a / b /
>> c / d / e".
>
> I think we should keep in mind that we're (hopefully) not going
> to see things like "a / b / c / d / e" in real-life code. Rather
> we're going to see things like
>
> backupath = destdir / "archive" / filename + ".bak"
>
> In other words, there should be some clue from the names
> that paths are involved, from which it should be fairly
> easy to guess what the "/" means.
+1
More information about the Python-ideas
mailing list