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

Nick Coghlan ncoghlan at gmail.com
Mon Oct 8 20:49:03 CEST 2012


On Tue, Oct 9, 2012 at 12:10 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Mon, 8 Oct 2012 10:06:17 -0600
> Andrew McNabb <amcnabb at mcnabbs.org> 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.

2. Using "join" as the method name is a bad idea for the same reason
that using "+" as the operator syntax would be a bad idea: it can
cause erroneous output instead of an exception if a string is passed
where a Path object is expected.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list