<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi
> just curious , if i have a code like this?
>
> def a():
>   def b():
>     print "b"
>   def c():
>     print "c"
>
> how can i call c() ??

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.  This is perfect
because you are in control - building worlds according to your own design.
Had it not been your intention to hide 'b' and 'c', you would not have
isolated them in this manner inside of  'a' .

I, for one, am so glad to have nested functions again ;-)
Thomas Bartkus


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to