[Python-ideas] Yield-From Example 2: Scheduler

Adam Olsen rhamph at gmail.com
Sat Feb 21 04:10:17 CET 2009


On Fri, Feb 20, 2009 at 2:09 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> But Python uses exceptions for errors, so ignoring
> return values is usually harmless. If you igore something
> that you shouldn't have ignored, you will usually find
> out about it pretty quickly, because your program will
> produce incorrect results.
>> Maybe this is where your gut instinct is coming from?

No, it's more about expect return to behave like yield, as in this:
def x():
 yield 1
 yield 2
 return 3
I realize I'm losing ground though. My argument is not as strong as I
thought it was.
-- 
Adam Olsen, aka Rhamphoryncus


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /