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

Antoine Pitrou solipsis at pitrou.net
Tue Oct 9 10:30:58 CEST 2012


Nick Coghlan <ncoghlan at ...> writes:
> 
> On Tue, Oct 9, 2012 at 12:10 AM, Antoine Pitrou <solipsis at ...> wrote:
> > On Mon, 8 Oct 2012 10:06:17 -0600
> > Andrew McNabb <amcnabb at ...> 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.
> >
> > The join() method already exists in the current PEP, but it's less
> > convenient, synctatically, than either '[]' or '/'.
> 
> Right. My objections boil down to:
> 
> 1. The case has not been adequately made that a second way to do it is
> needed. Therefore, the initial version should just include the method
> API.

For the record, most Path objects out there seem to include an operator-based
join operation (Twisted's FilePath is an exception, but its API is generally not
very pretty).

Still, I'll let the poll run a bit more :-)

Regards

Antoine.





More information about the Python-ideas mailing list