[Python-bugs-list] [ python-Feature Requests-694320 ] Add list.join()

SourceForge.net noreply@sourceforge.net
Sat, 29 Mar 2003 07:13:43 -0800


Feature Requests item #694320, was opened at 2003-02-27 13:52
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=694320&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel (kamek)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add list.join()

Initial Comment:
While there's string.join(list), I believe it'd make much 
more sense to have list.join(string). In most languages 
(and also in the string module), the first argument for join 
functions is the list, and the second is the separator. 
Not to mention code using methods directly in strings, 
like "' '.join(...)" is uglier :)

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2003-03-29 16:13

Message:
Logged In: YES 
user_id=21627

This has been discussed many times, and each time the
conclusion was that the idea is flawed, as it would require
adding join operations not only to lists, but to all
sequences. For example, Python currently supports

>>> "u".join("Hallo")
'Huaululuo'



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=694320&group_id=5470