p + q +1
This is a familiar notation to any developer and its been used widely.
On Thu, Oct 11, 2012 at 8:04 AM, Eric Snow firstname.lastname@example.org:
On Oct 8, 2012 5:35 PM, "Eric Snow" email@example.com wrote:
On Mon, Oct 8, 2012 at 12:47 PM, Antoine Pitrou firstname.lastname@example.org
- `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
+1 (with a different name)
I've found Nick's argument against operators-from-day-1 to be convincing, as well as his argument against join() or any other name already provided by string/sequence APIs.
Changing my vote:
p[q] -1 p + q -1 p / q +0 p.pathjoin() +1
A method is essential, regardless of the color the bikeshed ends up. As far as operators go, / is the only option here that doesn't conflict with string/collection APIs. The alternative has an adverse impact on subclassing and on future design choices on the path API. This goes for the method name too.
Python-ideas mailing list Pythonemail@example.com http://mail.python.org/mailman/listinfo/python-ideas