Revision 2 as of 2012-04-24 06:01:32

Clear message

Asking for Help: ...

The following puzzles me: Both a and b are globals. Both are assigned an initial value in fun(). But b is considered unassigned in fun1().

def fun():

def fun1():

fun()

UnboundLocalError: local variable 'b' referenced before assignment

When answering questions, add the CategoryAskingForHelpAnswered category when saving the page. This will move the link to this page from the questions section to the answers section on the Asking for Help page.


CategoryAskingForHelp

Unable to edit the page? See the FrontPage for instructions.