Re: [Python-Dev] PEP Idea: Syntactic sugar for StopIteration.
9 Dec
2007
9 Dec
'07
1:19 a.m.
At 07:55 PM 12/8/2007 -0500, Manuel Alejandro CerĂ³n Estrada wrote:
2007/12/8, Greg Ewing
: I would put it the other way around -- the problem that 'yield break' is meant to solve is already solved by 'return'. So there's no need for change.
I have been re-thinking the problem and this is true. The only exception would be empty generators, but they are rare.
Note that: def g(): return yield Is a valid empty generator. :)
5975
Age (days ago)
5975
Last active (days ago)
1 comments
2 participants
participants (2)
-
Phillip J. Eby
-
Tristan Seligmann