[Python-ideas] PEP 428: poll about the joining syntax
Paul Moore
p.f.moore at gmail.com
Mon Oct 8 22:22:30 CEST 2012
On Monday, 8 October 2012, Antoine Pitrou wrote:
>
>
> - `p[q]` joins path q to path p
-1 it isn't really indexing
> - `p + q` joins path q to path p
-1 risk of ambiguity (string concatenation, e.g. it's too easy to assume
you can add an extension with p + '.txt')
> - `p / q` joins path q to path p
-0 best of the operator options
> - `p.join(q)` joins path q to path p
+0 would like it except for the risk of silent errors if p is a string
p.joinpath(q)
+1 I wish there was a better name, but I doubt one will appear :-(
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121008/c6970c74/attachment.html>
More information about the Python-ideas
mailing list