[Python-ideas] PEP 428: poll about the joining syntax
Nadeem Vawda
nadeem.vawda at gmail.com
Sat Oct 13 00:16:38 CEST 2012
On Mon, Oct 8, 2012 at 8:47 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> - `p[q]` joins path q to path p
-1. Much less intuitive than the other two proposed operators.
> - `p + q` joins path q to path p
-1. Silently does the wrong thing if p and q are both strings.
> - `p / q` joins path q to path p
+1. Reads naturally, and fails loudly if p is a string.
> - `p.join(q)` joins path q to path p
-1. Produces a nonsensical result if p and q are both strings. I'd be
+1 on `p.joinpath(q)`, since it doesn't have this problem.
Cheers,
Nadeem
More information about the Python-ideas
mailing list