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.

classification
Title: Inconsistent text at TypeError in concatenation
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Make str and bytes error messages on concatenation conform with other sequences
View: 29116
Assigned To: Nosy List: serhiy.storchaka, wolfc01
Priority: normal Keywords:

Created on 2017-11-21 14:13 by wolfc01, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg306642 - (view) Author: Carl (wolfc01) Date: 2017-11-21 14:13
>>> a = b"jan"
>>> b = "jan"
>>> a+b
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't concat str to bytes
>>> b+a
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: must be str, not bytes
>>>

IMHO The latter TypeError text should be "TypeError: can't concat bytes to str"
msg306668 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-21 16:57
This is a duplicate of issue29116.
History
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76284
2017-11-21 16:57:58serhiy.storchakasetstatus: open -> closed

superseder: Make str and bytes error messages on concatenation conform with other sequences

nosy: + serhiy.storchaka
messages: + msg306668
resolution: duplicate
stage: resolved
2017-11-21 14:13:55wolfc01create