[EMAIL PROTECTED] wrote: > Ouch! You got me there, I did not copy the code properly. Now I feel > stupid. Thanks for the enlightment. > > I think I am starting to get it.
P.S. The point of the example was to show how nesting isn't necessary much of the time. The authors wanted to show that it is okay to write a call to f2 before f2 is even defined, as long as f2 is defined before that call is actually executed, i.e. when f1() is called. Keeping the two functions separate is cleaner than nesting, and passing parameters is how you get around the local scope issue. -- http://mail.python.org/mailman/listinfo/python-list