Re: How two modules call functions defined in each other?

2005-03-20 Thread Reinhold Birkenfeld
Tian wrote: > I am python beginner, I have a question about the interdependence of > modules. > > For example, when I have two modules: > > module1.py > - > def plus(x): > return add(x,1) > > > module2.py > - > def add(x,y): > return x+y > > def plus2(x): > return

Re: How two modules call functions defined in each other?

2005-03-20 Thread TZOTZIOY
On 19 Mar 2005 18:07:31 -0800, rumours say that "Tian" <[EMAIL PROTECTED]> might have written: >I am python beginner, I have a question about the interdependence of >modules. >For example, when I have two modules: > >module1.py >- >def plus(x): > return add(x,1) > > >module2.py >

How two modules call functions defined in each other?

2005-03-19 Thread Tian
I am python beginner, I have a question about the interdependence of modules. For example, when I have two modules: module1.py - def plus(x): return add(x,1) module2.py - def add(x,y): return x+y def plus2(x): return plus(x)+1 How should I write "import" in both