defining classes within loops?
David Bolen
db3l at fitlinxx.com
Fri Jul 27 17:50:15 EDT 2001
Roy Smith <roy at panix.com> writes:
> The documentation for the "continue" statement says:
>
> > continue may only occur syntactically nested in a for or while loop,
> > but not nested in a function or class definition
>
> Just out of curiosity, how many people have ever written a function or
> class definition nested inside a loop? Seems like sort of a strange thing
> to do, although I suppose it might be useful in some situations.
I personally haven't, but the function definition method would
certainly fit in with some of the threads about using a named function
close to invocation instead of lambda.
--
-- 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