[Python-ideas] Re: join() could add separators at start or end

2023-03-10 Thread Barry
> On 9 Mar 2023, at 00:37, Rob Cliffe via Python-ideas > wrote: > > Having had my last proposal shot down in flames, up I bob with another. 😁 See this discussion that has a nice solution proposed with the concat function. Barry > It seems to me that it would be useful to be able to make th

[Python-ideas] Re: join() could add separators at start or end

2023-03-10 Thread Antoine Rozo
I think `'\n'.join(lines, 1)` & `'\n'.join(lines, 'e')` are worse than `'\n'.join(lines, at_end=True)` or others, it's much more complicated to understand what will be produced. Le ven. 10 mars 2023 à 00:47, Rob Cliffe via Python-ideas < [email protected]> a écrit : > > > On 09/03/2023 05:2

[Python-ideas] Re: join() could add separators at start or end

2023-03-10 Thread constantin
Then we're back to square one, doing this would be more confusing than just adding the sep to the joined string. In my opinion, this proposal just isn't needed. The equivalent solution is easier to understand and to write, and will lead to way less confusion about what join() actually does. __