Boris Borcic wrote: > >>> x = (lambda : ((yield 666),(yield 777),(yield 888)))() > >>> x.next() > 666 > >>> x.next() > 777 > >>> x.next() > 888 > >>> x.next() > (None, None, None) > >>> x = (lambda : ((yield 666),(yield 777),(yield 888)) and None)() > >>> x.next() > 666 > >>> x.next() > 777 > >>> x.next() > 888 > >>> x.next() > > Traceback (most recent call last): > File "<pyshell#29>", line 1, in <module> > x.next() > StopIteration > >>>
Seems like a bug: py> def doit(): ((yield 1), (yield 2), (yield 3)) ... py> x = doit() py> x.next() 1 py> x.next() 2 py> x.next() 3 py> x.next() ------------------------------------------------------------ Traceback (most recent call last): File "<ipython console>", line 1, in <module> <type 'exceptions.StopIteration'> James -- http://mail.python.org/mailman/listinfo/python-list