return command in a function.
David Bolen
db3l at fitlinxx.com
Fri Sep 28 12:26:16 EDT 2001
Duncan Booth <duncan at NOSPAMrcp.co.uk> writes:
> In a language that, like Python, makes extensive use of exceptions, you
> already cannot guarantee a single exit point from your function. Using
> return in a controlled way from inside a function doesn't make this worse.
Of course, try/finally let's you guarantee both finalization of
resources in a function and a controlled exit when necessary.
--
-- David
--
/-----------------------------------------------------------------------\
\ David Bolen \ E-mail: db3l at fitlinxx.com /
| FitLinxx, Inc. \ Phone: (203) 708-5192 |
/ 860 Canal Street, Stamford, CT 06902 \ Fax: (203) 316-5150 \
\-----------------------------------------------------------------------/
More information about the Python-list
mailing list