>>> 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
 >>>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to