[New-bugs-announce] [issue16791] itertools.chain.from_iterable doesn't stop
David Halter
report at bugs.python.org
Thu Dec 27 13:30:02 CET 2012
New submission from David Halter:
The following lines run infinitely:
b = [1]
import itertools
b += itertools.chain.from_iterable([c] for c in b)
In my opinion this is a bug. Clearly you could say that this is an implementation detail. But afaik this is not documented and very misleading.
BTW: In PyPy b would be [1, 1].
----------
messages: 178296
nosy: davidhalter
priority: normal
severity: normal
status: open
title: itertools.chain.from_iterable doesn't stop
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16791>
_______________________________________
More information about the New-bugs-announce
mailing list