[issue9314] inconsistent result when concatenating list with iterators

Dirkjan Ochtman report at bugs.python.org
Tue Jul 20 21:04:15 CEST 2010


Dirkjan Ochtman <dirkjan at ochtman.nl> added the comment:

Sure, but:

>>> a = ['a', 'b', 'c']
>>> a += 'def'
>>> a
['a', 'b', 'c', 'd', 'e', 'f']

I think either way is fine (I'm probably on the side of refusing to guess), but what I don't understand is why a += b is different from a + b in this respect.

----------

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


More information about the Python-bugs-list mailing list