Message1050

Author scoder
Recipients
Date 2005-10-19.09:04:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Test case in Jython:

>>> from __future__ import generators
>>> def gen():
...   yield 1
...   raise StopIteration
...
>>> list(gen())
Traceback (innermost last):
  File "<console>", line 1, in ?
  File "<console>", line 3, in gen
StopIteration:

In CPython:
>>> def gen():
...   yield 1
...   raise StopIteration
...
>>> list(gen())
[1]

Same for tuple(gen()), etc., so the problem seems to
lie in the generator implementation.
History
Date User Action Args
2008-02-20 17:17:26adminlinkissue1331171 messages
2008-02-20 17:17:26admincreate