In article <5006b48a$0$29978$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: <SNIP. >Even with a break, why bother continuing through the body of the function >when you already have the result? When your calculation is done, it's >done, just return for goodness sake. You wouldn't write a search that >keeps going after you've found the value that you want, out of some >misplaced sense that you have to look at every value. Why write code with >unnecessary guard values and temporary variables out of a misplaced sense >that functions must only have one exit?
Example from recipee's: Stirr until the egg white is stiff. Alternative: Stirr egg white for half an hour, but if the egg white is stiff keep your spoon still. (Cooking is not my field of expertise, so the wording may not be quite appropriate. ) >-- >Steven Groetjes Albert -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list