Module Expr Str ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad keyword IfExp BoolOpAnd Call NameLoad CompareLt NameLoad Num NameLoad NameLoad keyword BoolOpOr UnaryOpNot Call NameLoad CompareGtE NameLoad Num keyword BoolOpOr UnaryOpNot Call NameLoad CompareGtE NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr If Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body If CompareIs Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr If CompareIsNot Call AttributeLoad NameLoad attr NameLoad body If BoolOpOr CompareGtE NameLoad Num BoolOpAnd CompareGtE NameLoad Num Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body If CompareNotEq Call AttributeLoad Call AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr orelse If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad If CompareGtE NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad If CompareGtE NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr body Expr Call NameLoad NameLoad NameLoad If CompareGtE NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad orelse If BoolOpOr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Assign NameStore NameLoad While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Break If Call AttributeLoad NameLoad attr body If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr Str NameLoad Break orelse Assign NameStore NameLoad orelse If BoolOpOr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Assign NameStore NameLoad While NameLoad body If Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore IfExp CompareGtE NameLoad Num Num NameLoad Assign NameStore NameLoad Assign NameStore NameLoad orelse Assign NameStore Str If Call NameLoad body Assign NameStore IfExp CompareGtE NameLoad Num Num NameLoad Assign NameStore NameLoad Assign NameStore IfExp CompareGtE NameLoad Num Str NameLoad orelse Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr body Break decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareLt NameLoad Num UnaryOpNot NameLoad Call AttributeLoad NameLoad attr CompareIsNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr While Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword BinOpMod Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If BoolOpAnd CompareLt NameLoad Num Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr If BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr keyword BinOpMod Str Call AttributeLoad NameLoad attr keyword IfExp Call NameLoad NameLoad Call AttributeLoad NameLoad attr keyword UnaryOpNot Call NameLoad keyword UnaryOpNot Call NameLoad orelse If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Call NameLoad Call NameLoad Call NameLoad For NameStore NameLoad body Expr Call NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr body For NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr body For NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad If Call AttributeLoad NameLoad attr Str body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list
N/A N/A  Variable closure taking.

This is the completion of variable object completion. The variables were not
immediately resolved to be bound to actual scopes, but are only now.

Only after this is executed, variable reference nodes can be considered
complete.
 nuitka PythonVersions Variables nuitka.nodes.NodeMakingHelpers makeConstantReplacementNode nuitka.Options isFullCompat nuitka.PythonVersions python_version nuitka.tree SyntaxErrors nuitka.VariableRegistry addVariableUsage isSharedAmongScopes Operations VisitorNoopMixin visitTree ReformulationFunctionStatements addFunctionVariableReleases VariableClosureLookupVisitorPhase1 N/A VisitorNoopMixin N/A N/A  Variable closure phase 1: Find assignments and early closure references.

        In class context, a reference to a variable must be obeyed immediately,
        so that "variable = variable" takes first "variable" as a closure and
        then adds a new local "variable" to override it from there on. For the
        not early closure case of a function, this will not be done and only
        assignments shall add local variables, and references will be ignored
        until phase 2.
     _handleNonLocal N/A N/A node N/A N/A N/A N/A non_local_names source_ref N/A N/A node getNonlocalDeclarations N/A N/A non_local_name non_local_names N/A N/A variable N/A N/A node getClosureVariable variable_name non_local_name N/A N/A N/A variable isModuleVariable N/A N/A N/A N/A SyntaxErrors raiseSyntaxError N/A no binding for nonlocal '%s' found non_local_name source_ref N/A N/A N/A isFullCompat N/A python_version 340 None source_ref display_file N/A N/A N/A isFullCompat N/A python_version 340 display_line N/A N/A N/A isFullCompat N/A python_version 340 N/A N/A N/A node registerProvidedVariable variable N/A N/A addVariableUsage variable node N/A staticmethod _handleQualnameSetup N/A N/A node N/A N/A N/A N/A N/A node qualname_setup None N/A N/A N/A N/A node isExpressionClassBody N/A N/A N/A class_assign qualname_assign N/A node qualname_setup N/A class_variable N/A N/A N/A N/A class_assign getTargetVariableRef getVariable N/A N/A N/A class_variable isModuleVariable N/A N/A qualname_node N/A N/A qualname_assign getAssignSource N/A N/A N/A qualname_node replaceWith N/A makeConstantReplacementNode constant N/A N/A class_variable getName node qualname_node N/A N/A node qualname_provider N/A N/A node getParentModule N/A N/A function_variable_ref N/A node qualname_setup N/A function_variable N/A N/A function_variable_ref getVariable N/A N/A N/A function_variable isModuleVariable N/A N/A N/A node qualname_provider N/A N/A node getParentModule N/A N/A node qualname_setup None N/A staticmethod onEnterNode N/A N/A self node N/A N/A N/A N/A N/A node isExpressionTargetVariableRef N/A N/A provider N/A N/A node getParentVariableProvider N/A N/A N/A N/A node getVariable None N/A N/A variable_name N/A N/A node getVariableName N/A variable N/A N/A provider getVariableForAssignment variable_name variable_name N/A N/A N/A node setVariable variable N/A N/A addVariableUsage N/A N/A node getVariable provider N/A N/A N/A N/A node isExpressionTargetTempVariableRef N/A N/A provider N/A N/A node getParentVariableProvider N/A N/A addVariableUsage N/A N/A node getVariable provider N/A N/A N/A N/A node isExpressionVariableRef N/A N/A N/A N/A N/A node getVariable None N/A N/A provider N/A N/A node getParentVariableProvider N/A N/A N/A provider isEarlyClosure N/A N/A variable N/A N/A provider getVariableForReference variable_name N/A N/A node getVariableName N/A N/A N/A N/A variable getOwner provider N/A N/A N/A N/A python_version 340 N/A N/A python_version 300 N/A N/A variable isModuleVariable N/A N/A variable N/A N/A Variables MaybeLocalVariable owner provider maybe_variable variable N/A N/A N/A node setVariable variable N/A N/A N/A N/A node isExpressionTempVariableRef N/A N/A N/A N/A N/A N/A N/A node getVariable getOwner N/A N/A node getParentVariableProvider N/A N/A N/A N/A node setVariable N/A N/A N/A N/A node getParentVariableProvider addClosureVariable N/A N/A node getVariable N/A N/A N/A N/A node isExpressionGeneratorObjectBody N/A N/A N/A N/A self _handleNonLocal node N/A N/A python_version 340 N/A N/A N/A N/A self _handleQualnameSetup node N/A N/A N/A N/A node isExpressionCoroutineObjectBody N/A N/A N/A N/A self _handleNonLocal node N/A N/A N/A self _handleQualnameSetup node N/A N/A N/A N/A node isExpressionClassBody N/A N/A N/A N/A self _handleNonLocal node N/A N/A python_version 340 N/A N/A N/A N/A self _handleQualnameSetup node N/A N/A N/A N/A node isExpressionFunctionBody N/A N/A N/A N/A self _handleNonLocal node N/A variable N/A N/A N/A N/A node getParameters getAllVariables N/A N/A N/A addVariableUsage variable node N/A N/A python_version 340 N/A N/A N/A N/A self _handleQualnameSetup node N/A N/A N/A N/A N/A node isExpressionAttributeLookup N/A N/A node isStatementAssignmentAttribute N/A N/A node isStatementDelAttribute N/A N/A attribute_name N/A N/A node getAttributeName N/A N/A N/A N/A attribute_name startswith __ N/A N/A N/A attribute_name endswith __ N/A N/A seen_function False N/A current node N/A True N/A N/A current N/A N/A current getParentVariableProvider N/A N/A N/A current isCompiledPythonModule N/A N/A N/A N/A N/A current isExpressionClassBody N/A N/A seen_function N/A N/A N/A N/A node setAttributeName N/A _%s%s N/A N/A N/A N/A N/A current getName lstrip _ attribute_name N/A N/A N/A seen_function True N/A N/A N/A N/A N/A node isStatementLoopBreak N/A N/A node isStatementLoopContinue N/A N/A current node N/A True N/A N/A N/A N/A current isParentVariableProvider N/A N/A N/A N/A node isStatementLoopContinue N/A N/A message 'continue' not properly in loop N/A col_offset N/A N/A python_version 300 16 None N/A display_line True N/A source_line None N/A N/A message 'break' outside loop N/A N/A isFullCompat N/A N/A col_offset N/A N/A python_version 300 2 None N/A display_line True N/A source_line N/A N/A python_version 300 None N/A N/A col_offset 13 N/A display_line True N/A source_line None N/A N/A N/A SyntaxErrors raiseSyntaxError message source_ref N/A N/A node getSourceReference col_offset col_offset display_line display_line source_line source_line N/A current N/A N/A current getParent N/A N/A N/A current isStatementLoop N/A N/A N/A N/A VariableClosureLookupVisitorPhase2 N/A VisitorNoopMixin N/A N/A  Variable closure phase 2: Find assignments and references.

        In class context, a reference to a variable must be obeyed immediately,
        so that "variable = variable" takes first "variable" as a closure and
        then adds a new local "variable" to override it from there on.

        So, assignments for early closure, accesses will already have a
        variable set now, the others, only in this phase.
     _attachVariable N/A N/A node provider N/A N/A N/A variable_name N/A N/A node getVariableName N/A was_taken N/A N/A provider hasTakenVariable variable_name N/A variable N/A N/A provider getVariableForReference variable_name variable_name N/A N/A N/A node setVariable variable N/A N/A N/A python_version 300 N/A was_taken N/A N/A provider isExpressionFunctionBodyBase N/A N/A N/A variable getOwner provider N/A N/A parent_provider N/A N/A provider getParentVariableProvider N/A N/A N/A parent_provider isExpressionClassBody N/A N/A parent_provider N/A N/A parent_provider getParentVariableProvider N/A N/A N/A N/A parent_provider isExpressionFunctionBody N/A N/A parent_provider isUnqualifiedExec N/A N/A N/A N/A SyntaxErrors raiseSyntaxError reason N/A N/A N/A PythonVersions getErrorMessageExecWithNestedFunction N/A N/A parent_provider getName source_ref N/A N/A parent_provider getExecSourceRef col_offset None display_file True display_line True source_line None N/A staticmethod onEnterNode N/A N/A self node N/A N/A N/A N/A N/A node isExpressionVariableRef N/A N/A provider N/A N/A node getParentVariableProvider N/A N/A N/A N/A node getVariable None N/A N/A N/A N/A self _attachVariable node provider N/A N/A addVariableUsage N/A N/A node getVariable provider N/A N/A N/A N/A node isExpressionTempVariableRef N/A N/A provider N/A N/A node getParentVariableProvider N/A N/A addVariableUsage N/A N/A node getVariable provider N/A N/A VariableClosureLookupVisitorPhase3 N/A VisitorNoopMixin N/A N/A  Variable closure phase 3: Find errors and complete frame variables.

        In this phase, we can do some fix-ups and find errors. We might e.g.
        detect that a "del" was executed on a shared variable, which is not
        allowed for Python 2.x, so it must be caught. The parsing wouldn't do
        that.

        Also, frame objects for functions should learn their variable names.
     onEnterNode N/A N/A self node N/A N/A N/A N/A N/A python_version 300 N/A N/A node isStatementDelVariable N/A N/A variable N/A N/A N/A N/A node getTargetVariableRef getVariable N/A N/A N/A N/A N/A variable isModuleVariable N/A isSharedAmongScopes variable N/A N/A N/A N/A SyntaxErrors raiseSyntaxError reason N/A can not delete variable '%s' referenced in nested scope N/A N/A variable getName source_ref N/A N/A isFullCompat None N/A N/A node getSourceReference display_file N/A N/A isFullCompat display_line N/A N/A isFullCompat N/A N/A N/A N/A node isStatementsFrame N/A N/A N/A N/A node updateLocalNames N/A N/A completeVariableClosures N/A N/A tree N/A N/A N/A visitors N/A N/A VariableClosureLookupVisitorPhase1 N/A VariableClosureLookupVisitorPhase2 N/A VariableClosureLookupVisitorPhase3 N/A visitor visitors N/A N/A N/A visitTree tree visitor N/A N/A N/A tree isCompiledPythonModule N/A N/A function N/A N/A tree getFunctions N/A N/A N/A visitTree function visitor N/A N/A N/A tree isCompiledPythonModule N/A N/A function N/A N/A tree getFunctions N/A N/A N/A addFunctionVariableReleases function N/A N/A N/A function hasFlag has_super N/A N/A N/A N/A N/A function hasVariableName __class__ N/A N/A class_var N/A N/A function getClosureVariable __class__ N/A N/A N/A function registerProvidedVariable class_var N/A N/A addVariableUsage class_var function N/A N/A N/A N/A function hasVariableName self N/A N/A self_var N/A N/A function getClosureVariable self N/A N/A N/A function registerProvidedVariable self_var N/A N/A addVariableUsage self_var function N/A