[issue29116] Make str and bytes error messages on concatenation conform with other sequences
Serhiy Storchaka
report at bugs.python.org
Sat Dec 31 01:54:11 EST 2016
Serhiy Storchaka added the comment:
Different cases accept different types. Not always we can say that only one specific type is accepted.
"list +" accepts only lists, "list +=" is a syntax sugar for list.extend and accepts any iterables. "bytes +" and "bytearray +=" accept any objects that support the buffer protocol. "array +" and "array +=" accept only arrays.
Changing semantic is out of the scope of this issue. I think there are reasons for current behavior.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29116>
_______________________________________
More information about the Python-bugs-list
mailing list