Again: Please hear my plea: print without softspace

David MacQuigg dmq at gain.com
Sat Mar 6 14:08:58 EST 2004


On Fri, 05 Mar 2004 04:39:49 -0700, David MacQuigg <dmq at gain.com>
wrote:

>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.

OK. I spent a few hours reading some old threads, and I see there are
a lot of discussions already on implementation problems, and
aesthetics.  I really can't discuss the implementation problems, other
than to say I have faith that if something *should* be done, it *can*
be done, as it *has* been done in other languages.  On the aesthetics,
I am totally agnostic. :>)  My concern is *usability* for technical
professionals who are non-programmers.  If anyone can point me to some
good threads, please do.

As we are getting way off-topic here, I stated a new thread "Need
better string methods".  See you there.

-- Dave




More information about the Python-list mailing list