[Alex Martelli, suggests that a functional join's default
 separator be the empty string]
>> Rationale: an emptystring joiner is the most frequent cases, but
>> several others (space, newline, space-comma, ...) occur often enough
>> to be worth allowing the joiner to be optionally specified.

[Barry Warsaw]
> If I look at the ones I write a lot it's emptystring, space, newline,
> comma-space and the Unicode versions of them occasionally.  There are
> others, but those are probably the majority of them.  I'm not sure what
> that tells us, except that I don't think there's an obvious default.
> You could probably argue for the emptystring just as well as for the
> space.

The existing string.join's default is a space, and-- back when that
was the only way to join() --I remember that suprised me about half,
and only half, the time I used it <0.5 wink>.  This really isn't like
split(), where split-on-whitespace is overwhelmingly most common.  In
the absence of an obvious default, better not to supply a default at
all.
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to