[Python-bugs-list] [ python-Feature Requests-694320 ] Add list.join()
SourceForge.net
noreply@sourceforge.net
Sat, 29 Mar 2003 18:17:05 -0800
Feature Requests item #694320, was opened at 2003-02-27 07:52
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=694320&group_id=5470
Category: None
Group: None
>Status: Closed
>Resolution: Rejected
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: Tim Peters (tim_one)
Date: 2003-03-29 21:17
Message:
Logged In: YES
user_id=31435
Guido has rejected this so often there's no point keeping
this open, so I'm just closing it. Martin actually undersold
the difficulty of implementing this string.join(x) works for
any iterable x, and that's a much larger set of objects than
just sequences.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-03-29 10: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