Vedran Čačić <ved...@gmail.com> added the comment:

Yes, I know what strong typing means, and can you please read again what I've 
written? It was exactly about "In the face of ambiguity, refuse the temptation 
to guess.", because binary operators are inherently ambiguous when given 
differently typed operands. Methods are not: the method _name_ itself is 
resolved according to self's type, it seems obvious to me that the arguments 
should too. Otherwise "explicit fanatics" would probably want to write 
list.append(things, more) instead of things.append(more).

The only reason we're having this conversation is that when it was introduced, 
`join` was a function, not a method. If it were a method from the start, we 
would've never even questioned its stringification of the iterable elements 
(and of course it would do that from the start, cf. set or dict update methods).

Gregory: yes, `bytes` elements are a problem, but that's a completely 
orthogonal problem (probably best left for linters). The easiest way to see it: 
do you object to (the current behavior of)

>>> s = {2, 7}
>>> s.update(b'Veky')

? :-)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43535>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to