On Wed, Jul 09, 2008, Carl Johnson wrote: > > 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: raise StopIteration > ... > >>> [x for x in range(100) if not f(x)] > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "<stdin>", line 1, in <listcomp> > File "<stdin>", line 2, in f > StopIteration > >>> list(x for x in range(100) if not f(x)) > [0, 1, 2, 3, 4, 5] > > Certainly, it's an inconsistency compared to generator expressions, > but is it a bug?
Dunno whether it's a bug, but please file a bug report to track this -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "as long as we like the same operating system, things are cool." --piranha _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com