[Python-ideas] PEP 428 - object-oriented filesystem paths

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 9 00:47:55 CEST 2012

Andrew McNabb wrote:
> Since this really is a matter of personal taste, I'll end my
> participation in this discussion by voicing support for Nick Coghlan's
> suggestion of a `join` method, whether it's named `join` or `append` or
> something else.

I'd prefer 'append', because

    path.append("somedir", "file.txt")

is pretty self-explanatory, whereas

    path.join("somedir", "path.txt")

looks confusingly similar to

    s.join("somedir", "path.txt")

where s is a string, but has very different semantics.


More information about the Python-ideas mailing list