'string.join' is wrong in my Python console

Robin Koch robin.koch at t-online.de
Thu Dec 3 13:15:01 EST 2015


Am 03.12.2015 um 18:42 schrieb Mark Lawrence:
> On 03/12/2015 17:01, Robin Koch wrote:
>> Am 03.12.2015 um 17:25 schrieb Ian Kelly:
>>> On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch <robin.koch at t-online.de>
>>> wrote:
>>>> Now *I* am confused.
>>>>
>>>> Shouldn't it be
>>>>
>>>> ", ".join(['1', '2', '4', '8', '16'])
>>>>
>>>> instead? Without any importing?
>>>
>>> That would be the normal way to write it. The FAQ entry is suggesting
>>> the string module function as an alternative for those who can't
>>> accept it as a string method.
>>
>> Whoops.
>> Thanks and sorry. :-)
>>
>
> You might like to note that here
> https://docs.python.org/3/faq/design.html#why-is-join-a-string-method-instead-of-a-list-or-tuple-method
> the reference to the string module function has been completely removed.

Actually I did. :-)
I tried the line with my Python 3.4 and it didn't work.
Then I sent my initial posting.

After Ians answer I took a look in the 2.x and the 3.x FAQs and found 
exactly that phrase removed. :-)

-- 
Robin Koch




More information about the Python-list mailing list