[Python-ideas] PEP 428: poll about the joining syntax

rohit sharma rohit0286 at gmail.com
Thu Oct 11 08:19:09 CEST 2012


p + q               +1

This is a familiar notation to any developer and its been used widely.

Regards,
Rohit.

On Thu, Oct 11, 2012 at 8:04 AM, Eric Snow <ericsnowcurrently at gmail.com>wrote:

>
> On Oct 8, 2012 5:35 PM, "Eric Snow" <ericsnowcurrently at gmail.com> wrote:
> >
> > On Mon, Oct 8, 2012 at 12:47 PM, Antoine Pitrou <solipsis at pitrou.net>
> wrote:
> > > - `p[q]` joins path q to path p
> > -1
> > > - `p + q` joins path q to path p
> > -1
> > > - `p / q` joins path q to path p
> > -1
> > > - `p.join(q)` joins path q to path p
> > +1 (with a different name)
> >
> > I've found Nick's argument against operators-from-day-1 to be
> > convincing, as well as his argument against join() or any other name
> > already provided by string/sequence APIs.
>
> Changing my vote:
>
> p[q]                 -1
> p + q               -1
> p / q               +0
> p.pathjoin()   +1
>
> A method is essential, regardless of the color the bikeshed ends up.  As
> far as operators go, / is the only option here that doesn't conflict with
> string/collection APIs.  The alternative has an adverse impact on
> subclassing and on future design choices on the path API.  This goes for
> the method name too.
>
> -eric
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121011/4f053abe/attachment.html>


More information about the Python-ideas mailing list