[issue9314] inconsistent result when concatenating list with iterators

Ray.Allen report at bugs.python.org
Wed Jul 21 08:09:38 CEST 2010


Ray.Allen <ysj.ray at gmail.com> added the comment:

Alexander:

> When a is mutable, a += b updates it in-place, so there is no ambiguity: the type of a cannot change.  When you do a + b, there is no reason to treat a as more deserving than b when selecting the type of the result

Does this means "a += b" is not the same as "a = a + b"? I'd think this can be seen as a pitfall for python.

----------
nosy: +ysj.ray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9314>
_______________________________________


More information about the Python-bugs-list mailing list