Message284855
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. |
|
Date |
User |
Action |
Args |
2017-01-06 21:32:18 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, ned.deily, serhiy.storchaka, levkivskyi, xiang.zhang, Jim Fasarakis-Hilliard |
2017-01-06 21:32:18 | terry.reedy | set | messageid: <1483738338.61.0.334044025484.issue29116@psf.upfronthosting.co.za> |
2017-01-06 21:32:18 | terry.reedy | link | issue29116 messages |
2017-01-06 21:32:18 | terry.reedy | create | |
|