◐ Shell
clean mode source ↗

Issue 32103: Inconsistent text at TypeError in concatenation

>>> 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"