A data flow node corresponding to a module-level (global) variable that is accessed outside of the module scope.
Global variables may appear twice in the data flow graph, as both
ModuleVariableNodes. The former is used to represent data flow between global variables as it
occurs during module initialization, and the latter is used to represent data flow via global
variable reads and writes during run-time.
It is possible for data to flow from assignments made at module initialization time to reads made
at run-time, but not vice versa. For example, there will be flow from
SINK in the
g = SOURCE def foo(): SINK(g)
but not the other way round:
SINK(g) def bar() global g g = SOURCE
Data flow through
ModuleVariableNodes is represented as
jumpSteps, and so any write of a
global variable can flow to any read of the same variable.
Gets the possible values of the variable at the end of import time
Gets a node that reads this variable.
Gets the enclosing callable of this node.
Gets the location of this node
Gets the module in which this variable appears.
Gets the scope of this node.
Gets the global variable corresponding to this node.
Gets a textual representation of this element.
Gets the control-flow node corresponding to this node, if any.
Gets the expression corresponding to this node, if any.
Gets the ESSA variable corresponding to this node, if any.
Gets a local source node from which data may flow to this node in zero or more local data-flow steps.
Holds if this element is at the specified location. The location spans column