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