New submission from Antoine Pietri: >>> b'a' + 'a' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can't concat bytes to str
This error message is misleading because it is reversed: what is really happening is that we're concatenating str to bytes! When you say "attach A to B" it means B is there first and A is added to it afterwards. That said, we can't just reverse the message (“can't concat str to bytes”), because having the message reversed compared to the code would be also misleading. I therefore propose to use “and” (→ “can't concat bytes and str”), which makes more sense and preserve the order. ---------- messages: 296870 nosy: antoine.pietri priority: normal severity: normal status: open title: Misleading message “can't concat bytes to str” _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30762> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com