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

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -