On 28/06/13 05:18, Jim Mooney wrote:
What's the Pythonic standard on multiple returns from a function?

There is no standard.
Multiple returns are quite common but they come with all the usual caveats for using them, they can introduce complexity and hard
to find bugs so use them sensibly.

Computer Science purists don't like them for good theoretical
reasons, but personally I find them one of the least offensive
of the "rule breakers" and forcing a single exit can often
involve ugly extra conditionals etc.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to