'string.join' is wrong in my Python console

Mark Lawrence breamoreboy at yahoo.co.uk
Thu Dec 3 12:42:27 EST 2015


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.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list