That would be strongly preferred to duplication across hundreds of use cases and thousands (millions?) of users. Not all of them are likely to come up with the most efficient implementation either.<br>-------- Original Message --------<br>On Jan 29, 2019, 18:44, David Mertz < mertz@gnosis.cx> wrote:<blockquote class="protonmail_quote"><br><div dir="auto"><div>stringify = lambda it: type(it)(map(str, it))</div><div dir="auto"><br></div><div dir="auto">Done! Does that really need to be in the STDLIB?<br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Tue, Jan 29, 2019, 7:11 PM Alex Shafer via Python-ideas <<a href="mailto:python-ideas@python.org">python-ideas@python.org</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">1) I'm in favor of adding a stringify method to all collections<br><br>2) strings are special and worthy of a "special case" because strings tend to be human readable and are used in all kinds of user interface.<br><br><br><br>-------- Original Message --------<br>On Jan 29, 2019, 16:04, Steven D'Aprano < <a href="mailto:steve@pearwood.info" target="_blank" rel="noreferrer">steve@pearwood.info</a>> wrote:<blockquote class="m_1735470889629654284protonmail_quote"><br><p dir="ltr">On Tue, Jan 29, 2019 at 10:51:26PM +0100, Jamesie Pic wrote:</p>
<p dir="ltr">> What do you think of list.stringify(delim) ?</p>
<p dir="ltr">What's so special about lists? What do you think of:</p>
<p dir="ltr">tuple.stringify<br>
deque.stringify<br>
iterator.stringify<br>
dict.keys.stringify</p>
<p dir="ltr">etc. And what's so special about strings that lists have to support a<br>
stringify method and not every other type?</p>
<p dir="ltr">list.floatify<br>
list.intify<br>
list.tuplify<br>
list.setify<br>
list.iteratorify</p>
<p dir="ltr">Programming languages should be more about composable, re-usable general<br>
purpose components more than special cases.<br></p>
<p dir="ltr">--<br>
Steve<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank" rel="noreferrer">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank" rel="noreferrer">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank" rel="noreferrer">http://python.org/psf/codeofconduct/</a><br>
</p>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank" rel="noreferrer">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></blockquote></div></div></div>
</div>