[Python-ideas] PEP 428: poll about the joining syntax
Senthil Kumaran
senthil at uthcode.com
Tue Oct 9 09:10:47 CEST 2012
Antoine Pitrou <solipsis at pitrou.net> wrote:
> - `p[q]` joins path q to path p
-1
I think, this is listed as example in PEP 428.
I had to look it up to understand. Not intuitive (to me atleast) as join.
> - `p + q` joins path q to path p
+0.
I would be +1. But in the PEP you have listed that we need a way
separate path behaviors from confusing with builtins
Though it provides a lot of convenience, it can be confused with str
behaviors or other object behaviors.
> - `p / q` joins path q to path p
-1.
> - `p.join(q)` joins path q to path p
+0
> `p.pathjoin(q)`
+1
It is very explicit and hard to get it wrong.
More information about the Python-ideas
mailing list