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

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Oct 13 00:38:59 CEST 2012


On 08/10/2012 19:47, Antoine Pitrou wrote:
>
> Hello,
>
> Since there has been some controversy about the joining syntax used in
> PEP 428 (filesystem path objects), I would like to run an informal poll
> about it. Please answer with +1/+0/-0/-1 for each proposal:
>
> - `p[q]` joins path q to path p
> - `p + q` joins path q to path p
> - `p / q` joins path q to path p
> - `p.join(q)` joins path q to path p
>
> (you can include a rationale if you want, but don't forget to vote :-))
>
> Thank you
>
> Antoine.
>
>

How about using the caret symbol to join so `p ^ q`?  Rationale, it 
looks like a miniature combination of the backslash and forwardslash so 
should keep Windows and *nix camps happy, plus it's only used in Python 
(I think?) for bitwise operations so shouldn't confuse anybody. 
Parachute is ready for the antiaircraft fire :)

-- 
Cheers.

Mark Lawrence.




More information about the Python-ideas mailing list