python - nonlocal variable->IndentationError: expected an indented block -


this code:


  • def **make_print_driver_singelton_class**():    counter=0    def **setcount**():    nonlocal counter counte+=1 

i error:

nonlocal counter        ^ indentationerror: expected indented block 

what problem?

i think code has indentation problems.

def **make_print_driver_singelton_class**():   counter=0     def **setcount**():        nonlocal counter       counte+=1 

                 


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -