Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Kapil, this behavior was intentional (not a bug), but later regarded as a design mistake. GvR has said that if he had to do it over again list.__iadd__ would only accept other lists. The problem arises when people write "somelist += 'hello'" and expect it to add a single string with one word rather than five one letter strings. That said, the current behavior is guaranteed, people rely on it, and we cannot change it. As Karthikeyan points out, this is documented. However since the docs have grown so voluminous, it is often difficult to find any one particular fact. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45293> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com