There is a collection of nodes used to represent assignments. Each
assignment statement in the source code becomes a single
Assign node in the AST. The nodes attribute is a
list that contains a node for each assignment target. This is
necessary because assignment can be chained, e.g.
Each target assignment node will describe the kind of object being
assigned to: AssName for a simple name, e.g.
The target assignment nodes also have a flags attribute that indicates whether the node is being used for assignment or in a delete statement. The AssName is also used to represent a delete statement, e.g. del x.
When an expression contains several attribute references, an assignment or delete statement will contain only one AssAttr node - for the final attribute reference. The other attribute references will be represented as Getattr nodes in the expr attribute of the AssAttr instance.
See About this document... for information on suggesting changes.