Brendan Barnwell wrote:
Personally what I find is perverse is that .join is a method of strings but does NOT call str() on the items to be joined.

Neither do most other string methods:

>>> s = "hovercraft"
>>> s.count(42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly

Why should join() be any different?

--
Greg

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to