#NEWLINE# def indentation( logical_line , previous_logical , indent_char , indent_level , previous_indent_level ) : #NEWLINE# #INDENT# "\n    Use 4 spaces per indentation level.\n\n    For really old code that you don't want to mess up, you can continue to\n    use 8-space tabs.\n\n    Okay: a = 1\n    Okay: if a == 0:\\n    a = 1\n    E111:   a = 1\n\n    Okay: for item in items:\\n    pass\n    E112: for item in items:\\npass\n\n    Okay: a = 1\\nb = 2\n    E113: a = 1\\n    b = 2\n    " #NEWLINE# if ( ( indent_char == ' ' ) and ( indent_level % 4 ) ) : #NEWLINE# #INDENT# ( yield ( 0 , 'E111 indentation is not a multiple of four' ) ) #NEWLINE# #UNINDENT# indent_expect = previous_logical . endswith ( ':' ) #NEWLINE# if ( indent_expect and ( indent_level <= previous_indent_level ) ) : #NEWLINE# #INDENT# ( yield ( 0 , 'E112 expected an indented block' ) ) #NEWLINE# #UNINDENT# if ( ( indent_level > previous_indent_level ) and ( not indent_expect ) ) : #NEWLINE# #INDENT# ( yield ( 0 , 'E113 unexpected indentation' ) )