How clean/elegant is Python's syntax?

Alister alister.ware at ntlworld.com
Fri May 31 07:52:11 EDT 2013


On Fri, 31 May 2013 03:27:52 -0700, rusi wrote:

> On May 31, 2:08 pm, Alister <alister.w... at ntlworld.com> wrote:
>> On Thu, 30 May 2013 20:38:40 +0100, MRAB wrote:
>> > And additional argument (pun not intended) for putting sep second is
>> > that you can give it a default value:
>>
>> >     def join(iterable, sep=""): return sep.join(iterable)
>>
>> I think that is the winning argument.
> 
> Yes
> 
>> Next question is what should be the default ("", " " or',')?
> 
> Hmm... Never thought there was any choice here except "".  Yes can see
> the case for each.

to be fair "" is probably the most sensible although in my programs most 
joins are using ','



-- 
We are governed not by armies and police but by ideas.
		-- Mona Caird, 1892



More information about the Python-list mailing list