Gregory P. Smith <g...@krypto.org> added the comment:

There is a lot of doubt.  That should clearly raise an exception because this 
function is intended to only operate on strings.

Trivial types examples like that gloss over the actual problem.

data_from_some_computations = [b"foo", b"bar"]  # probably returned by a 
function

... later on, some other place in the code ...

colon_sep_data = ":".join(data_from_some_computations)

I guarantee you that 99.999% of the time everyone wants an exception there 
instead of their colon_sep_data to contain `b"foo":b"bar"`.

Implicit conversions always lead to hard to pin down bugs.  An exception raised 
at the source of the problem is very easy to debug in comparison.

----------

_______________________________________
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