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 <rep...@bugs.python.org>
<http://bugs.python.org/issue16791>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to