This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author antoine.pietri
Recipients antoine.pietri
Date 2017-06-26.10:13:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498472017.09.0.210411923746.issue30762@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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.
History
Date User Action Args
2017-06-26 10:13:37antoine.pietrisetrecipients: + antoine.pietri
2017-06-26 10:13:37antoine.pietrisetmessageid: <1498472017.09.0.210411923746.issue30762@psf.upfronthosting.co.za>
2017-06-26 10:13:37antoine.pietrilinkissue30762 messages
2017-06-26 10:13:36antoine.pietricreate