Terry J. Reedy added the comment:

By default, error message wording changes are 'enhancements' that wait for the 
next x.y.0 release unless the current wording is positively wrong'.  This is 
different from doc changes because there are tests depending on error messages. 
'Inconsistent' or 'awkward' is not the same as 'wrong'.

I do agree that the clipped "must be str, not bytes' is awkward.  What (which) 
is it that must be str?  A fleshed out and positive "can only concatenate str 
(not bytes) to str." would be clearer and educate users better.

As Serhiy said, the exact equivalent cannot be said for bytes.

>>> b'a' + bytearray(b'b')
b'ab'
>>> b'a' + memoryview(b'b')
b'ab'

However "Can only concatenate bytes, bytearray, or memoryview (not x) to 
bytes." would be good if this is in fact complete. I need to be educated on 
this ;-)  I was not sure about memoryview until I tried it.

----------
nosy: +terry.reedy
type: behavior -> enhancement
versions:  -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to