nested functions

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Apr 14 17:21:07 EDT 2006


In article <tv-dnXWdvtN4MqLZRVn-gA at telcove.net>,
 "Thomas Bartkus" <thomasbartkus at comcast.net> wrote:

>Your function 'a' is it's own little world where functions 'b' and 'c'
>exist.
>Your code inside 'a' can call 'b' or 'c' - neat as you please.
>
>BUT 'b' and 'c' simply do not exist outside the 'a' world.

It's worth distinguishing between the _names_ 'b' and 'c' and the 
_functions_ referred to by those names. The _names_ certainly do not 
exist outside of the scope of the function referred to by 'a' (any 
occurrences of 'b' and 'c' outside that scope refer to _different_ 
names), but the _functions_ they refer to certainly do exist.



More information about the Python-list mailing list