Georg Brandl [EMAIL PROTECTED] added the comment:
This is not a bug, see this thread:
http://mail.python.org/pipermail/python-3000/2008-July/014328.html
--
nosy: +georg.brandl
resolution: - wont fix
status: open - closed
___
Python tracker [EMAIL
New submission from Carl Johnson [EMAIL PROTECTED]:
Compare the following behaviors:
Python 3.0a5 (r30a5:62856, May 10 2008, 10:34:28)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type help, copyright, credits or license for more
information.
def f(x):
... if x 5:
Matt Giuca [EMAIL PROTECTED] added the comment:
You seem to be suggesting that a StopIteration raised in the body of a
for-loop should cause the loop to break. That isn't (as far as I know)
the point of StopIteration. StopIteration is only used to break the
for-loop when raised by the iterator,
Guido van Rossum [EMAIL PROTECTED] added the comment:
IMO the generator expression is wrong in interpreting the StopIteration
as a break. It should fail just like the list comprehension fails.
--
nosy: +gvanrossum
___
Python tracker [EMAIL PROTECTED]