Again: Please hear my plea: print without softspace

David MacQuigg dmq at gain.com
Fri Mar 5 06:39:49 EST 2004


On Fri, 5 Mar 2004 00:47:35 -0500, "Terry Reedy" <tjreedy at udel.edu>
wrote:
>"David MacQuigg" <dmq at gain.com> wrote in message
>news:4pgf409lhtme32fb4gmdfdar8astq074jv at 4ax.com...
>> Actually, I think this is rather ugly. The string 'method' still looks
>> like a 'function'.  We really need a 'join' method that takes a list
>> of strings as its 'front-door' object and the 'joiner' as its optional
>> 'side-door' input.
>
>A said in previous discussions, the second parameter of the join function
>is *any* iterable of strings, and not just lists.  Your proposal would
>either cripple or omit this generality, depending on whether you meant it
>as a replacement of or redundant supplement to the current
>joiner.join(iterable_of_strings) method.

I would make it a supplement and treat the issue of deprecation the
same as other string functions which now have a (redundant) method
equivalent.  Also, I would keep the same level of generality in the
new method.  If 'seq' is a sequence of strings (list or iterable), and
'sep' is the desired separator, we have now:
sep.join(seq)
and I would like to see an equivalent
seq.join(sep)

I just did a search on 'join strings group:comp.lang.python' and came
up with 1200 hits!  Looks like I need to do some research before
wading into these waters.  I'll post a new topic, if I decide to
pursue this discussion, since we are getting a bit off on this one.  I
would also like to see a 'map' method.  With 'map' and 'join' methods
we could greatly improve the readability of long sequences of
operations on strings (like Ruby).  Again, I need to do some research.

-- Dave




More information about the Python-list mailing list