[Python-ideas] PEP 428: poll about the joining syntax
Daniel Holth
dholth at gmail.com
Wed Oct 10 04:34:59 CEST 2012
On Tue, Oct 9, 2012 at 3:32 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 10/9/2012 9:30 AM, Eric Snow wrote:
>>
>>
>> On Oct 9, 2012 1:12 AM, "Senthil Kumaran"
>> <senthil at uthcode.com
>> <mailto:senthil at uthcode.com>> wrote:
>> > > `p.pathjoin(q)`
>> >
>> > +1
>> >
>> > It is very explicit and hard to get it wrong.
>
>
> or path.concat(otherpath)
>
> --
> Terry Jan Reedy
I like the [] syntax. ZODB works this way when the subpath name is not
a valid Python identifier. a.b['c-d'] would be like a/b/c-d if ZODB
was a filesystem. I like the + syntax.
No one has suggested overloading the > operator?
p1 > p2 > p3
The < operator would keep its normal use for sorting. ;-)
More information about the Python-ideas
mailing list