Thanks :)

On Dec 3, 2007 6:58 PM, Terry Reedy <[EMAIL PROTECTED]> wrote:

>
> "Victor Subervi" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> | def a():
> |  b()
>
> Here is the error: should be
>   c = b()
>
> |  print c
> |
> | def b():
> |  c = "Hi"
> |  return c
> |
> | if __name__ == "__main__":
> |  a()
> |
> | then run a(). Throws error about c not being defined. How do I return c
> from
> | b?
>
> You did, but you did not 'catch' it within a().  See above for change.
>
> tjr
>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to