No 1.6! (was Re: A REALLY COOL PYTHON FEATURE:)

Mike Fletcher mfletch at tpresence.com
Thu May 18 08:10:47 EDT 2000


That's not very self explanatory (in the code).  The whole construct seems
fishy, but if we must have it (diving down the slippery Perl slopes), how
about:

" ".interspersesItselfBetweenTheElementsOf( ["this", "That"] )

Of course, then, we have to decide whether "the" and "of" should really be
capitalized.

" ".interspersesItselfBetweentheElementsof( ["this", "That"] )

It is certainly easier to type without them capitalized, but is the savings
really that great?  It is so much harder to read that I don't think the
shortcut would be justified.  So, in conclusion, please change the "join"
method's name to interspersesItselfBetweenTheElementsOf, and, preferably,
leave functions which are not naturally methods of strings out of the string
object (avoiding the slippery Java slopes) :) .

Enjoy yourselves,
Mike

-----Original Message-----
From: Peter Schneider-Kamp [mailto:petersc at stud.ntnu.no]
Sent: Thursday, May 18, 2000 8:00 AM
To: python-list at python.org
Subject: Re: No 1.6! (was Re: A REALLY COOL PYTHON FEATURE:)


Martijn Faassen wrote:
> 
> In the case of 'foo'.join() this stops making sense:
> 
>   I join the list of strings with spaces.
> 
>   ' '.join(list)

Well how about this:
  The space joins the elements of the list.

  ' '.joins(list)

> lots-of-instinctive-language-analysis-ly yours,

more-of-that-stuff-ly y'rs
Peter
--
Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter at schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de

-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list