Thanks :)<br><br><div class="gmail_quote">On Dec 3, 2007 6:58 PM, Terry Reedy <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>"Victor Subervi" <<a href="mailto:victorsubervi@gmail.com">victorsubervi@gmail.com</a>> wrote in message<br>news:4dc0cfea0712031205t1a6bb511vd8744015d6ff2660@mail.gmail.com...<br>| def a():<br>|  b()<br>
<br>Here is the error: should be<br>   c = b()<br><div class="Ih2E3d"><br>|  print c<br>|<br>| def b():<br>|  c = "Hi"<br>|  return c<br>|<br>| if __name__ == "__main__":<br>|  a()<br>|<br>| then run a(). Throws error about c not being defined. How do I return c
<br>from<br>| b?<br><br></div>You did, but you did not 'catch' it within a().  See above for change.<br><br>tjr<br><div><div></div><div class="Wj3C7c"><br><br><br><br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">
http://mail.python.org/mailman/listinfo/python-list</a><br></div></div></blockquote></div><br>