scoping problems

Dublanc, David ddublanc at free.fr
Fri Jul 27 15:23:58 EDT 2001


Hi,
You can do it exactly as you write it !
If I understand namespace in Python, function names a et b are known by the
module before that function objects are executed.

Regards,

David


"Narayan Desai" <desai at mcs.anl.gov> a écrit dans le message news:
yrx66cegqs2.fsf at catbert.mcs.anl.gov...
> How can i define the following code:
>
> def a():
>     b()
>
> def b():
>     a()
>
> (ignoring for a moment that this would never terminate)
> How do you get the namespaces right?
>
> I would solve this with function prototypes in C, but it isn't clear
> to me how to do this in python.
> thanks...
>  -nld
>





More information about the Python-list mailing list