[issue9314] inconsistent result when concatenating list with iterators
Dirkjan Ochtman
report at bugs.python.org
Tue Jul 20 13:28:42 CEST 2010
New submission from Dirkjan Ochtman <dirkjan at ochtman.nl>:
This seems wrong:
>>> a = []
>>> b = iter(['c', 'd'])
>>> a += b
>>> c = []
>>> c + iter(['d', 'e'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can only concatenate list (not "listiterator") to list
In other words, if iadd can deal with it, why can't add?
----------
components: Interpreter Core
messages: 110887
nosy: djc
priority: normal
severity: normal
status: open
title: inconsistent result when concatenating list with iterators
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9314>
_______________________________________
More information about the Python-bugs-list
mailing list