[Tutor] question about function inside of function
Richard D. Moores
rdmoores at gmail.com
Sat Jan 9 10:53:48 CET 2010
I'm working on a function that seems to cry out for some of its code
to be put in a function. For convenience sake, I've put this new
function inside the one that calls it.
Question 1: Is this bad practice? It works fine that way, but..
Question 2: If the answer to Q1 is no, is there a standard place to
put a function inside of another function? Is it standard to have it
the first line of the function? I've put mine at the point where it
would be called, mainly as a reminder to myself.
An outline of the big function is:
if:
else:
for loop
for loop
if
elif
the function
call the function
else
Thanks,
Dick Moores
More information about the Tutor
mailing list