Just by the title I thought you meant
.join([2, 3, 4])
[2, 1, 3, 1, 4]
This is what I'd expect on the list class.
So -1 for your suggestion but +1 for what I thought you meant before I read the complete mail :)
On 29 Jan 2019, at 02:40, Jamesie Pic email@example.com wrote:
During the last 10 years, Python has made steady progress in convenience to assemble strings. However, it seems to me that joining is still, when possible, the cleanest way to code string assembly.
However, I'm still sometimes confused between the different syntaxes used by join methods:
- os.path.join takes *args
- str.join takes a list argument, this inconsistence make it easy to mistake with the os.path.join signature
Also, I still think that:
Would be more readable as such:
Not only this would fix both of my issues with the current status-quo, but this would also be completely backward compatible, and probably not very hard to implement: just add a join method to list.
Thanks in advance for your reply
Have a great day
-- ∞ _______________________________________________ Python-ideas mailing list Pythonfirstname.lastname@example.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/