[issue32103] Inconsistent text at TypeError in concatenation

Carl report at bugs.python.org
Tue Nov 21 09:13:55 EST 2017


New submission from Carl <carl at wolff-online.nl>:

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

----------
components: Interpreter Core
messages: 306642
nosy: wolfc01
priority: normal
severity: normal
status: open
title: Inconsistent text at TypeError in concatenation
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32103>
_______________________________________


More information about the Python-bugs-list mailing list