Seems like what you need is <div><br></div><div>from othermodule import bb</div><div><br></div><div>def aa():</div><div>    bb()</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 2:51 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Julio Sergio wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Jose H. Martinez <josehmartinezz <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You should define the function first and then call it.<br>
<br>
<br>
 def something(i):     return i<br>
<br>
<br>
a = something(5)<br>
<br>
<br>
If you want a reference to the function somewhere else you can do this:<br>
<br>
</blockquote>
<br>
I know that. That was what I meant by "changing the order of the definitions will work" in my original message.<br>
<br>
And I insist in the issue, which is not trivial... In my message I mentioned "crossed recursion", and I delve into it here:<br>
<br>
Suppose I have to define two functions, aa, and, bb that are designed to call each other:<br>
<br>
  def aa():<br>
     ...<br>
     ... a call of bb() somewhere in the body of aa<br>
     ...<br>
<br>
  def bb():<br>
     ...<br>
     ... a call of aa() somewhere in the body of bb<br>
     ...<br>
<br>
<br>
Whatever the order of definition of aa and bb the problem remains<br>
</blockquote>
<br></div>
No.  The reply from MRAB explains this.<span class="HOEnZb"><font color="#888888"><br>
<br>
~Ethan~<br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div>