A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045543.html below:

[Python-Dev] Wild Idea for the Year

[Python-Dev] Wild Idea for the Year [Python-Dev] Wild Idea for the YearJosiah Carlson jcarlson at uci.edu
Thu Jun 24 04:34:50 EDT 2004
> What is wrong with the following code?
> 
>     def join(*iterable):
>         s = ""
>         for e in iterable:
>             s = s + e
>         return s

[snip implementation specific description]

That would be terribly nifty, but it begs the question:
If we do this for strings (an immutable sequence type), do we do this
for tuples (another immutable sequence type)?

Likely not on the tuple side, considering Python's reliance on tuples in
virtually every (is it every?) function call, additional overhead is
additional overhead, and rarely do I see people doing tuple
concatenation.

I do like the possibility that Python can be the first language to solve
the repeated string concatenation problem.  It would also reduce the
need to tell newbies in c.l.py "don't do string concatenation, use
''.join(lst)".

 - Josiah


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4