[Python-ideas] PEP 428: poll about the joining syntax
Serhiy Storchaka
storchaka at gmail.com
Tue Oct 9 00:00:43 CEST 2012
On 08.10.12 21:47, Antoine Pitrou wrote:
> 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:
Of course I have no right to vote, but because the poll is informal, I
give my humble opinion.
> - `p[q]` joins path q to path p
-1. Counter intuitive and indexing can be used for path splitting.
> - `p + q` joins path q to path p
-1. Confusion with strings. path + str can be used for suffix appending.
> - `p / q` joins path q to path p
+1. Intuitive. No risk of conflicts.
> - `p.join(q)` joins path q to path p
-0. A bit confusion with strings. -0.1 verbose. +0.1 can have many
arguments. +0.1 similar to os.path.join. -0.1 but have a little
different semantic.
> - `p.pathjoin(q)` joins path q to path p
+0. Same as `p.join(q)`, but more verbose (-) and less confusion (+).
More information about the Python-ideas
mailing list