This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients eric.smith, mrabarnett, pablogsal, rhettinger, serhiy.storchaka, terry.reedy, veky, xtreak
Date 2021-03-20.08:31:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616229094.21.0.698344738763.issue43535@roundup.psfhosted.org>
In-reply-to
Content
Vedran, it is not what strong typing means. Strong typing means that '2'+3 is an error instead of '23' or 5. str.join() expects an iterable of strings. If some of items is not a string, it is a sign of programming error. I prefer to get an exception rather of silently conversion of unexpected value to string 'None', '[]' or '<Foo object at 0x12345678>'.

So if you want such feature, it should be separate method or function.

But there is other consideration. Of 721 uses of the join() method (excluding os.path.join()) in the stdlib, only 10 need forceful stringification with map(str, ...). For tests it is 842 to 20, and for Doc/venv/ it is 1388 to 30. I am sure the same ratio is for any other large volume of code. So that feature would actually have very small use - 1-2% of use of str.join().

Specially to Raymond, map(str, ...) is good opportunity to teach about iterators and introduce to itertools.
History
Date User Action Args
2021-03-20 08:31:34serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, terry.reedy, eric.smith, mrabarnett, veky, pablogsal, xtreak
2021-03-20 08:31:34serhiy.storchakasetmessageid: <1616229094.21.0.698344738763.issue43535@roundup.psfhosted.org>
2021-03-20 08:31:34serhiy.storchakalinkissue43535 messages
2021-03-20 08:31:33serhiy.storchakacreate