compiler.ast
index
/usr/local/lib/python2.4/compiler/ast.py
Module Docs

Python abstract syntax node definitions
 
This file is automatically generated by Tools/compiler/astgen.py

 
Classes
       
Node
Add
And
AssAttr
AssList
AssName
AssTuple
Assert
Assign
AugAssign
Backquote
Bitand
Bitor
Bitxor
Break
CallFunc
Class
Compare
Const
Continue
Decorators
Dict
Discard
Div
Ellipsis
EmptyNode
Exec
Expression
FloorDiv
For
From
Function
GenExpr
GenExprFor
GenExprIf
GenExprInner
Getattr
Global
If
If
Import
Invert
Keyword
Lambda
LeftShift
List
ListComp
ListCompFor
ListCompIf
Mod
Module
Mul
Name
Not
Or
Pass
Power
Print
Printnl
Raise
Return
RightShift
Slice
Sliceobj
Stmt
Sub
Subscript
TryExcept
TryFinally
Tuple
UnaryAdd
UnarySub
While
Yield

 
class Add(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class And(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class AssAttr(Node)
     Methods defined here:
__init__(self, expr, attrname, flags, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class AssList(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class AssName(Node)
     Methods defined here:
__init__(self, name, flags, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class AssTuple(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Assert(Node)
     Methods defined here:
__init__(self, test, fail, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Assign(Node)
     Methods defined here:
__init__(self, nodes, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class AugAssign(Node)
     Methods defined here:
__init__(self, node, op, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Backquote(Node)
     Methods defined here:
__init__(self, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Bitand(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Bitor(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Bitxor(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Break(Node)
     Methods defined here:
__init__(self, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class CallFunc(Node)
     Methods defined here:
__init__(self, node, args, star_args=None, dstar_args=None, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Class(Node)
     Methods defined here:
__init__(self, name, bases, doc, code, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Compare(Node)
     Methods defined here:
__init__(self, expr, ops, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Const(Node)
     Methods defined here:
__init__(self, value, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Continue(Node)
     Methods defined here:
__init__(self, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Decorators(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Dict(Node)
     Methods defined here:
__init__(self, items, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Discard(Node)
     Methods defined here:
__init__(self, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Div(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Ellipsis(Node)
     Methods defined here:
__init__(self, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class EmptyNode(Node)
     Methods inherited from Node:
__iter__(self)
asList(self)
getChildNodes(self)
getChildren(self)

 
class Exec(Node)
     Methods defined here:
__init__(self, expr, locals, globals, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Expression(Node)
     Methods defined here:
__init__(self, node)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class FloorDiv(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class For(Node)
     Methods defined here:
__init__(self, assign, list, body, else_, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class From(Node)
     Methods defined here:
__init__(self, modname, names, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Function(Node)
     Methods defined here:
__init__(self, decorators, name, argnames, defaults, flags, doc, code, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class GenExpr(Node)
     Methods defined here:
__init__(self, code, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class GenExprFor(Node)
     Methods defined here:
__init__(self, assign, iter, ifs, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class GenExprIf(Node)
     Methods defined here:
__init__(self, test, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class GenExprInner(Node)
     Methods defined here:
__init__(self, expr, quals, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Getattr(Node)
     Methods defined here:
__init__(self, expr, attrname, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Global(Node)
     Methods defined here:
__init__(self, names, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class If(Node)
     Methods defined here:
__init__(self, tests, else_, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Import(Node)
     Methods defined here:
__init__(self, names, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Invert(Node)
     Methods defined here:
__init__(self, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Keyword(Node)
     Methods defined here:
__init__(self, name, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Lambda(Node)
     Methods defined here:
__init__(self, argnames, defaults, flags, code, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class LeftShift(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class List(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class ListComp(Node)
     Methods defined here:
__init__(self, expr, quals, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class ListCompFor(Node)
     Methods defined here:
__init__(self, assign, list, ifs, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class ListCompIf(Node)
     Methods defined here:
__init__(self, test, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Mod(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Module(Node)
     Methods defined here:
__init__(self, doc, node, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Mul(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Name(Node)
     Methods defined here:
__init__(self, name, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Node
    Abstract base class for ast nodes.
 
  Methods defined here:
__iter__(self)
asList(self)
getChildNodes(self)
getChildren(self)

 
class Not(Node)
     Methods defined here:
__init__(self, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Or(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Pass(Node)
     Methods defined here:
__init__(self, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Power(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Print(Node)
     Methods defined here:
__init__(self, nodes, dest, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Printnl(Node)
     Methods defined here:
__init__(self, nodes, dest, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Raise(Node)
     Methods defined here:
__init__(self, expr1, expr2, expr3, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Return(Node)
     Methods defined here:
__init__(self, value, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class RightShift(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Slice(Node)
     Methods defined here:
__init__(self, expr, flags, lower, upper, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Sliceobj(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Stmt(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Sub(Node)
     Methods defined here:
__init__(self, (left, right), lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Subscript(Node)
     Methods defined here:
__init__(self, expr, flags, subs, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class TryExcept(Node)
     Methods defined here:
__init__(self, body, handlers, else_, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class TryFinally(Node)
     Methods defined here:
__init__(self, body, final, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Tuple(Node)
     Methods defined here:
__init__(self, nodes, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class UnaryAdd(Node)
     Methods defined here:
__init__(self, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class UnarySub(Node)
     Methods defined here:
__init__(self, expr, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class While(Node)
     Methods defined here:
__init__(self, test, body, else_, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
class Yield(Node)
     Methods defined here:
__init__(self, value, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
obj = class If(Node)
     Methods defined here:
__init__(self, tests, else_, lineno=None)
__repr__(self)
getChildNodes(self)
getChildren(self)

Methods inherited from Node:
__iter__(self)
asList(self)

 
Functions
       
flatten(list)
flatten_nodes(list)

 
Data
        CO_VARARGS = 4
CO_VARKEYWORDS = 8
name = 'If'
nodes = {'expression': 'Expression'}