compiler.pycodegen
index
/usr/lib/python2.2/compiler/pycodegen.py

 
Modules
            
compiler.ast
compiler.future
imp
marshal
compiler.misc
os
compiler.pyassem
stat
string
struct
compiler.symbols
compiler.syntax
sys
types
 
Classes
            
AbstractClassCode
AbstractCompileMode
Expression
Interactive
Module
AbstractFunctionCode
CodeGenerator
Delegator
AugGetattr
AugName
AugSlice
AugSubscript
LocalNameFinder
NestedScopeMixin
ClassCodeGenerator(NestedScopeMixin, AbstractClassCode, CodeGenerator)
ExpressionCodeGenerator(NestedScopeMixin, CodeGenerator)
FunctionCodeGenerator(NestedScopeMixin, AbstractFunctionCode, CodeGenerator)
InteractiveCodeGenerator(NestedScopeMixin, CodeGenerator)
ModuleCodeGenerator(NestedScopeMixin, CodeGenerator)
OpFinder
compiler.misc.Stack
BlockStack
 
class AbstractClassCode
       
   Methods defined here:
__init__(self, klass, scopes, module)
finish(self)
get_module(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
 
class AbstractCompileMode
       
   Methods defined here:
__init__(self, source, filename)
_get_tree(self)
compile(self)
getCode(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
mode = None
 
class AbstractFunctionCode
       
   Methods defined here:
__init__(self, func, scopes, isLambda, class_name, mod)
finish(self)
generateArgUnpack(self, args)
get_module(self)
unpackSequence(self, tup)
unpackTuple = unpackSequence(self, tup)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
lambdaCount = 0
optimized = 1
 
class AugGetattr(Delegator)
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'

Methods inherited from Delegator:
__getattr__(self, attr)
__init__(self, obj)
 
class AugName(Delegator)
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'

Methods inherited from Delegator:
__getattr__(self, attr)
__init__(self, obj)
 
class AugSlice(Delegator)
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'

Methods inherited from Delegator:
__getattr__(self, attr)
__init__(self, obj)
 
class AugSubscript(Delegator)
       
   Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'

Methods inherited from Delegator:
__getattr__(self, attr)
__init__(self, obj)
 
class BlockStack(compiler.misc.Stack)
      # XXX this doesn't seem to be used
 
   Methods defined here:
_BlockStack__super_init = __init__(self)
__init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'

Methods inherited from compiler.misc.Stack:
__getitem__(self, index)
__len__(self)
push(self, elt)
top(self)
 
class ClassCodeGenerator(NestedScopeMixin, AbstractClassCode, CodeGenerator)
       
  
Method resolution order:
ClassCodeGenerator
NestedScopeMixin
AbstractClassCode
CodeGenerator

Methods defined here:
_ClassCodeGenerator__super_init = __init__(self, klass, scopes, module)
__init__(self, klass, scopes, module)
super_init = __init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
scopes = None

Methods inherited from NestedScopeMixin:
initClass(self)

Methods inherited from AbstractClassCode:
finish(self)
get_module(self)

Methods inherited from CodeGenerator:
_implicitNameOp(self, prefix, name)
Emit name ops for names generated implicitly by for loops
 
The interpreter generates names that start with a period or
dollar sign.  The symbol table ignores these names because
they aren't present in the program text.
_nameOp(self, prefix, name)
_resolveDots(self, name)
_setupGraphDelegation(self)
_visitAssSequence(self, node, op='UNPACK_SEQUENCE')
_visitFuncOrLambda(self, node, isLambda=0)
binaryOp(self, node, op)
bitOp(self, nodes, op)
checkClass(self)
Verify that class is constructed correctly
delName(self, name)
getCode(self)
Return a code object
isLocalName(self, name)
loadName(self, name)
mangle(self, name)
parseSymbols(self, tree)
set_lineno(self, node, force=0)
Emit SET_LINENO if node has lineno attribute and it is
different than the last lineno emitted.
 
Returns true if SET_LINENO was emitted.
 
There are no rules for when an AST node should have a lineno
attribute.  The transformer and AST code need to be reviewed
and a consistent policy implemented and documented.  Until
then, this method works around missing line numbers.
storeName(self, name)
unaryOp(self, node, op)
visitAdd(self, node)
visitAnd(self, node)
visitAssAttr(self, node)
visitAssList = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssName(self, node)
visitAssTuple = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssert(self, node)
visitAssign(self, node)
visitAugAssign(self, node)
visitAugGetattr(self, node, mode)
visitAugName(self, node, mode)
visitAugSlice(self, node, mode)
visitAugSubscript(self, node, mode)
visitBackquote(self, node)
visitBitand(self, node)
visitBitor(self, node)
visitBitxor(self, node)
visitBreak(self, node)
visitCallFunc(self, node)
visitClass(self, node)
visitCompare(self, node)
visitConst(self, node)
visitContinue(self, node)
visitDict(self, node)
visitDiscard(self, node)
visitDiv(self, node)
visitEllipsis(self, node)
visitExec(self, node)
visitExpression(self, node)
visitFloorDiv(self, node)
visitFor(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGetattr(self, node)
visitGlobal(self, node)
visitIf(self, node)
visitImport(self, node)
visitInvert(self, node)
visitKeyword(self, node)
visitLambda(self, node)
visitLeftShift(self, node)
visitList(self, node)
visitListComp(self, node)
visitListCompFor(self, node)
visitListCompIf(self, node, branch)
visitMod(self, node)
visitModule(self, node)
visitMul(self, node)
visitName(self, node)
visitNot(self, node)
visitOr(self, node)
visitPass(self, node)
visitPower(self, node)
visitPrint(self, node, newline=0)
visitPrintnl(self, node)
visitRaise(self, node)
visitReturn(self, node)
visitRightShift(self, node)
visitSlice(self, node, aug_flag=None)
visitSliceobj(self, node)
visitSub(self, node)
visitSubscript(self, node, aug_flag=None)
visitTest(self, node, jump)
visitTryExcept(self, node)
visitTryFinally(self, node)
visitTuple(self, node)
visitUnaryAdd(self, node)
visitUnaryInvert(self, node)
visitUnarySub(self, node)
visitWhile(self, node)
visitYield(self, node)

Data and non-method functions inherited from CodeGenerator:
ClassGen = None
FunctionGen = None
NameFinder = <class compiler.pycodegen.LocalNameFinder>
Find local names in scope
_CodeGenerator__initialized = None
_CodeGenerator__list_count = 0
_augmented_opcode = {'%=': 'INPLACE_MODULO', '&=': 'INPLACE_AND', '**=': 'INPLACE_POWER', '*=': 'INPLACE_MULTIPLY', '+=': 'INPLACE_ADD', '-=': 'INPLACE_SUBTRACT', '//=': 'INPLACE_FLOOR_DIVIDE', '/=': 'INPLACE_DIVIDE', '<<=': 'INPLACE_LSHIFT', '>>=': 'INPLACE_RSHIFT', ...}
class_name = None
optimized = 0
 
class CodeGenerator
      Defines basic code generator for Python bytecode
 
This class is an abstract base class.  Concrete subclasses must
define an __init__() that defines self.graph and then calls the
__init__() defined in this class.
 
The concrete class must also define the class attributes
NameFinder, FunctionGen, and ClassGen.  These attributes can be
defined in the initClass() method, which is a hook for
initializing these methods after all the classes have been
defined.
 
   Methods defined here:
__init__(self)
_implicitNameOp(self, prefix, name)
Emit name ops for names generated implicitly by for loops
 
The interpreter generates names that start with a period or
dollar sign.  The symbol table ignores these names because
they aren't present in the program text.
_nameOp(self, prefix, name)
_resolveDots(self, name)
_setupGraphDelegation(self)
_visitAssSequence(self, node, op='UNPACK_SEQUENCE')
_visitFuncOrLambda(self, node, isLambda=0)
binaryOp(self, node, op)
bitOp(self, nodes, op)
checkClass(self)
Verify that class is constructed correctly
delName(self, name)
getCode(self)
Return a code object
get_module(self)
initClass(self)
This method is called once for each class
isLocalName(self, name)
loadName(self, name)
mangle(self, name)
parseSymbols(self, tree)
set_lineno(self, node, force=0)
Emit SET_LINENO if node has lineno attribute and it is
different than the last lineno emitted.
 
Returns true if SET_LINENO was emitted.
 
There are no rules for when an AST node should have a lineno
attribute.  The transformer and AST code need to be reviewed
and a consistent policy implemented and documented.  Until
then, this method works around missing line numbers.
storeName(self, name)
unaryOp(self, node, op)
visitAdd(self, node)
visitAnd(self, node)
visitAssAttr(self, node)
visitAssList = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssName(self, node)
visitAssTuple = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssert(self, node)
visitAssign(self, node)
visitAugAssign(self, node)
visitAugGetattr(self, node, mode)
visitAugName(self, node, mode)
visitAugSlice(self, node, mode)
visitAugSubscript(self, node, mode)
visitBackquote(self, node)
visitBitand(self, node)
visitBitor(self, node)
visitBitxor(self, node)
visitBreak(self, node)
visitCallFunc(self, node)
visitClass(self, node)
visitCompare(self, node)
visitConst(self, node)
visitContinue(self, node)
visitDict(self, node)
visitDiscard(self, node)
visitDiv(self, node)
visitEllipsis(self, node)
visitExec(self, node)
visitExpression(self, node)
visitFloorDiv(self, node)
visitFor(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGetattr(self, node)
visitGlobal(self, node)
visitIf(self, node)
visitImport(self, node)
visitInvert(self, node)
visitKeyword(self, node)
visitLambda(self, node)
visitLeftShift(self, node)
visitList(self, node)
visitListComp(self, node)
visitListCompFor(self, node)
visitListCompIf(self, node, branch)
visitMod(self, node)
visitModule(self, node)
visitMul(self, node)
visitName(self, node)
visitNot(self, node)
visitOr(self, node)
visitPass(self, node)
visitPower(self, node)
visitPrint(self, node, newline=0)
visitPrintnl(self, node)
visitRaise(self, node)
visitReturn(self, node)
visitRightShift(self, node)
visitSlice(self, node, aug_flag=None)
visitSliceobj(self, node)
visitSub(self, node)
visitSubscript(self, node, aug_flag=None)
visitTest(self, node, jump)
visitTryExcept(self, node)
visitTryFinally(self, node)
visitTuple(self, node)
visitUnaryAdd(self, node)
visitUnaryInvert(self, node)
visitUnarySub(self, node)
visitWhile(self, node)
visitYield(self, node)

Data and non-method functions defined here:
ClassGen = None
FunctionGen = None
NameFinder = <class compiler.pycodegen.LocalNameFinder>
Find local names in scope
_CodeGenerator__initialized = None
_CodeGenerator__list_count = 0
__doc__ = 'Defines basic code generator for Python bytecod...er all the classes have been\n defined.\n '
__module__ = 'compiler.pycodegen'
_augmented_opcode = {'%=': 'INPLACE_MODULO', '&=': 'INPLACE_AND', '**=': 'INPLACE_POWER', '*=': 'INPLACE_MULTIPLY', '+=': 'INPLACE_ADD', '-=': 'INPLACE_SUBTRACT', '//=': 'INPLACE_FLOOR_DIVIDE', '/=': 'INPLACE_DIVIDE', '<<=': 'INPLACE_LSHIFT', '>>=': 'INPLACE_RSHIFT', ...}
class_name = None
optimized = 0
 
class Delegator
      Base class to support delegation for augmented assignment nodes
 
To generator code for augmented assignments, we use the following
wrapper classes.  In visitAugAssign, the left-hand expression node
is visited twice.  The first time the visit uses the normal method
for that node .  The second time the visit uses a different method
that generates the appropriate code to perform the assignment.
These delegator classes wrap the original AST nodes in order to
support the variant visit methods.
 
   Methods defined here:
__getattr__(self, attr)
__init__(self, obj)

Data and non-method functions defined here:
__doc__ = 'Base class to support delegation for augmented ...to\n support the variant visit methods.\n '
__module__ = 'compiler.pycodegen'
 
class Expression(AbstractCompileMode)
       
   Methods defined here:
compile(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
mode = 'eval'

Methods inherited from AbstractCompileMode:
__init__(self, source, filename)
_get_tree(self)
getCode(self)
 
class ExpressionCodeGenerator(NestedScopeMixin, CodeGenerator)
       
  
Method resolution order:
ExpressionCodeGenerator
NestedScopeMixin
CodeGenerator

Methods defined here:
_ExpressionCodeGenerator__super_init = __init__(self)
__init__(self, tree)
get_module(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
futures = ()
scopes = None

Methods inherited from NestedScopeMixin:
initClass(self)

Methods inherited from CodeGenerator:
_implicitNameOp(self, prefix, name)
Emit name ops for names generated implicitly by for loops
 
The interpreter generates names that start with a period or
dollar sign.  The symbol table ignores these names because
they aren't present in the program text.
_nameOp(self, prefix, name)
_resolveDots(self, name)
_setupGraphDelegation(self)
_visitAssSequence(self, node, op='UNPACK_SEQUENCE')
_visitFuncOrLambda(self, node, isLambda=0)
binaryOp(self, node, op)
bitOp(self, nodes, op)
checkClass(self)
Verify that class is constructed correctly
delName(self, name)
getCode(self)
Return a code object
isLocalName(self, name)
loadName(self, name)
mangle(self, name)
parseSymbols(self, tree)
set_lineno(self, node, force=0)
Emit SET_LINENO if node has lineno attribute and it is
different than the last lineno emitted.
 
Returns true if SET_LINENO was emitted.
 
There are no rules for when an AST node should have a lineno
attribute.  The transformer and AST code need to be reviewed
and a consistent policy implemented and documented.  Until
then, this method works around missing line numbers.
storeName(self, name)
unaryOp(self, node, op)
visitAdd(self, node)
visitAnd(self, node)
visitAssAttr(self, node)
visitAssList = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssName(self, node)
visitAssTuple = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssert(self, node)
visitAssign(self, node)
visitAugAssign(self, node)
visitAugGetattr(self, node, mode)
visitAugName(self, node, mode)
visitAugSlice(self, node, mode)
visitAugSubscript(self, node, mode)
visitBackquote(self, node)
visitBitand(self, node)
visitBitor(self, node)
visitBitxor(self, node)
visitBreak(self, node)
visitCallFunc(self, node)
visitClass(self, node)
visitCompare(self, node)
visitConst(self, node)
visitContinue(self, node)
visitDict(self, node)
visitDiscard(self, node)
visitDiv(self, node)
visitEllipsis(self, node)
visitExec(self, node)
visitExpression(self, node)
visitFloorDiv(self, node)
visitFor(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGetattr(self, node)
visitGlobal(self, node)
visitIf(self, node)
visitImport(self, node)
visitInvert(self, node)
visitKeyword(self, node)
visitLambda(self, node)
visitLeftShift(self, node)
visitList(self, node)
visitListComp(self, node)
visitListCompFor(self, node)
visitListCompIf(self, node, branch)
visitMod(self, node)
visitModule(self, node)
visitMul(self, node)
visitName(self, node)
visitNot(self, node)
visitOr(self, node)
visitPass(self, node)
visitPower(self, node)
visitPrint(self, node, newline=0)
visitPrintnl(self, node)
visitRaise(self, node)
visitReturn(self, node)
visitRightShift(self, node)
visitSlice(self, node, aug_flag=None)
visitSliceobj(self, node)
visitSub(self, node)
visitSubscript(self, node, aug_flag=None)
visitTest(self, node, jump)
visitTryExcept(self, node)
visitTryFinally(self, node)
visitTuple(self, node)
visitUnaryAdd(self, node)
visitUnaryInvert(self, node)
visitUnarySub(self, node)
visitWhile(self, node)
visitYield(self, node)

Data and non-method functions inherited from CodeGenerator:
ClassGen = None
FunctionGen = None
NameFinder = <class compiler.pycodegen.LocalNameFinder>
Find local names in scope
_CodeGenerator__initialized = None
_CodeGenerator__list_count = 0
_augmented_opcode = {'%=': 'INPLACE_MODULO', '&=': 'INPLACE_AND', '**=': 'INPLACE_POWER', '*=': 'INPLACE_MULTIPLY', '+=': 'INPLACE_ADD', '-=': 'INPLACE_SUBTRACT', '//=': 'INPLACE_FLOOR_DIVIDE', '/=': 'INPLACE_DIVIDE', '<<=': 'INPLACE_LSHIFT', '>>=': 'INPLACE_RSHIFT', ...}
class_name = None
optimized = 0
 
class FunctionCodeGenerator(NestedScopeMixin, AbstractFunctionCode, CodeGenerator)
       
  
Method resolution order:
FunctionCodeGenerator
NestedScopeMixin
AbstractFunctionCode
CodeGenerator

Methods defined here:
_FunctionCodeGenerator__super_init = __init__(self, func, scopes, isLambda, class_name, mod)
__init__(self, func, scopes, isLambda, class_name, mod)
super_init = __init__(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
scopes = None

Methods inherited from NestedScopeMixin:
initClass(self)

Methods inherited from AbstractFunctionCode:
finish(self)
generateArgUnpack(self, args)
get_module(self)
unpackSequence(self, tup)
unpackTuple = unpackSequence(self, tup)

Data and non-method functions inherited from AbstractFunctionCode:
lambdaCount = 0
optimized = 1

Methods inherited from CodeGenerator:
_implicitNameOp(self, prefix, name)
Emit name ops for names generated implicitly by for loops
 
The interpreter generates names that start with a period or
dollar sign.  The symbol table ignores these names because
they aren't present in the program text.
_nameOp(self, prefix, name)
_resolveDots(self, name)
_setupGraphDelegation(self)
_visitAssSequence(self, node, op='UNPACK_SEQUENCE')
_visitFuncOrLambda(self, node, isLambda=0)
binaryOp(self, node, op)
bitOp(self, nodes, op)
checkClass(self)
Verify that class is constructed correctly
delName(self, name)
getCode(self)
Return a code object
isLocalName(self, name)
loadName(self, name)
mangle(self, name)
parseSymbols(self, tree)
set_lineno(self, node, force=0)
Emit SET_LINENO if node has lineno attribute and it is
different than the last lineno emitted.
 
Returns true if SET_LINENO was emitted.
 
There are no rules for when an AST node should have a lineno
attribute.  The transformer and AST code need to be reviewed
and a consistent policy implemented and documented.  Until
then, this method works around missing line numbers.
storeName(self, name)
unaryOp(self, node, op)
visitAdd(self, node)
visitAnd(self, node)
visitAssAttr(self, node)
visitAssList = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssName(self, node)
visitAssTuple = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssert(self, node)
visitAssign(self, node)
visitAugAssign(self, node)
visitAugGetattr(self, node, mode)
visitAugName(self, node, mode)
visitAugSlice(self, node, mode)
visitAugSubscript(self, node, mode)
visitBackquote(self, node)
visitBitand(self, node)
visitBitor(self, node)
visitBitxor(self, node)
visitBreak(self, node)
visitCallFunc(self, node)
visitClass(self, node)
visitCompare(self, node)
visitConst(self, node)
visitContinue(self, node)
visitDict(self, node)
visitDiscard(self, node)
visitDiv(self, node)
visitEllipsis(self, node)
visitExec(self, node)
visitExpression(self, node)
visitFloorDiv(self, node)
visitFor(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGetattr(self, node)
visitGlobal(self, node)
visitIf(self, node)
visitImport(self, node)
visitInvert(self, node)
visitKeyword(self, node)
visitLambda(self, node)
visitLeftShift(self, node)
visitList(self, node)
visitListComp(self, node)
visitListCompFor(self, node)
visitListCompIf(self, node, branch)
visitMod(self, node)
visitModule(self, node)
visitMul(self, node)
visitName(self, node)
visitNot(self, node)
visitOr(self, node)
visitPass(self, node)
visitPower(self, node)
visitPrint(self, node, newline=0)
visitPrintnl(self, node)
visitRaise(self, node)
visitReturn(self, node)
visitRightShift(self, node)
visitSlice(self, node, aug_flag=None)
visitSliceobj(self, node)
visitSub(self, node)
visitSubscript(self, node, aug_flag=None)
visitTest(self, node, jump)
visitTryExcept(self, node)
visitTryFinally(self, node)
visitTuple(self, node)
visitUnaryAdd(self, node)
visitUnaryInvert(self, node)
visitUnarySub(self, node)
visitWhile(self, node)
visitYield(self, node)

Data and non-method functions inherited from CodeGenerator:
ClassGen = None
FunctionGen = None
NameFinder = <class compiler.pycodegen.LocalNameFinder>
Find local names in scope
_CodeGenerator__initialized = None
_CodeGenerator__list_count = 0
_augmented_opcode = {'%=': 'INPLACE_MODULO', '&=': 'INPLACE_AND', '**=': 'INPLACE_POWER', '*=': 'INPLACE_MULTIPLY', '+=': 'INPLACE_ADD', '-=': 'INPLACE_SUBTRACT', '//=': 'INPLACE_FLOOR_DIVIDE', '/=': 'INPLACE_DIVIDE', '<<=': 'INPLACE_LSHIFT', '>>=': 'INPLACE_RSHIFT', ...}
class_name = None
 
class Interactive(AbstractCompileMode)
       
   Methods defined here:
compile(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
mode = 'single'

Methods inherited from AbstractCompileMode:
__init__(self, source, filename)
_get_tree(self)
getCode(self)
 
class InteractiveCodeGenerator(NestedScopeMixin, CodeGenerator)
       
  
Method resolution order:
InteractiveCodeGenerator
NestedScopeMixin
CodeGenerator

Methods defined here:
_InteractiveCodeGenerator__super_init = __init__(self)
__init__(self, tree)
get_module(self)
visitDiscard(self, node)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
futures = ()
scopes = None

Methods inherited from NestedScopeMixin:
initClass(self)

Methods inherited from CodeGenerator:
_implicitNameOp(self, prefix, name)
Emit name ops for names generated implicitly by for loops
 
The interpreter generates names that start with a period or
dollar sign.  The symbol table ignores these names because
they aren't present in the program text.
_nameOp(self, prefix, name)
_resolveDots(self, name)
_setupGraphDelegation(self)
_visitAssSequence(self, node, op='UNPACK_SEQUENCE')
_visitFuncOrLambda(self, node, isLambda=0)
binaryOp(self, node, op)
bitOp(self, nodes, op)
checkClass(self)
Verify that class is constructed correctly
delName(self, name)
getCode(self)
Return a code object
isLocalName(self, name)
loadName(self, name)
mangle(self, name)
parseSymbols(self, tree)
set_lineno(self, node, force=0)
Emit SET_LINENO if node has lineno attribute and it is
different than the last lineno emitted.
 
Returns true if SET_LINENO was emitted.
 
There are no rules for when an AST node should have a lineno
attribute.  The transformer and AST code need to be reviewed
and a consistent policy implemented and documented.  Until
then, this method works around missing line numbers.
storeName(self, name)
unaryOp(self, node, op)
visitAdd(self, node)
visitAnd(self, node)
visitAssAttr(self, node)
visitAssList = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssName(self, node)
visitAssTuple = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssert(self, node)
visitAssign(self, node)
visitAugAssign(self, node)
visitAugGetattr(self, node, mode)
visitAugName(self, node, mode)
visitAugSlice(self, node, mode)
visitAugSubscript(self, node, mode)
visitBackquote(self, node)
visitBitand(self, node)
visitBitor(self, node)
visitBitxor(self, node)
visitBreak(self, node)
visitCallFunc(self, node)
visitClass(self, node)
visitCompare(self, node)
visitConst(self, node)
visitContinue(self, node)
visitDict(self, node)
visitDiv(self, node)
visitEllipsis(self, node)
visitExec(self, node)
visitExpression(self, node)
visitFloorDiv(self, node)
visitFor(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGetattr(self, node)
visitGlobal(self, node)
visitIf(self, node)
visitImport(self, node)
visitInvert(self, node)
visitKeyword(self, node)
visitLambda(self, node)
visitLeftShift(self, node)
visitList(self, node)
visitListComp(self, node)
visitListCompFor(self, node)
visitListCompIf(self, node, branch)
visitMod(self, node)
visitModule(self, node)
visitMul(self, node)
visitName(self, node)
visitNot(self, node)
visitOr(self, node)
visitPass(self, node)
visitPower(self, node)
visitPrint(self, node, newline=0)
visitPrintnl(self, node)
visitRaise(self, node)
visitReturn(self, node)
visitRightShift(self, node)
visitSlice(self, node, aug_flag=None)
visitSliceobj(self, node)
visitSub(self, node)
visitSubscript(self, node, aug_flag=None)
visitTest(self, node, jump)
visitTryExcept(self, node)
visitTryFinally(self, node)
visitTuple(self, node)
visitUnaryAdd(self, node)
visitUnaryInvert(self, node)
visitUnarySub(self, node)
visitWhile(self, node)
visitYield(self, node)

Data and non-method functions inherited from CodeGenerator:
ClassGen = None
FunctionGen = None
NameFinder = <class compiler.pycodegen.LocalNameFinder>
Find local names in scope
_CodeGenerator__initialized = None
_CodeGenerator__list_count = 0
_augmented_opcode = {'%=': 'INPLACE_MODULO', '&=': 'INPLACE_AND', '**=': 'INPLACE_POWER', '*=': 'INPLACE_MULTIPLY', '+=': 'INPLACE_ADD', '-=': 'INPLACE_SUBTRACT', '//=': 'INPLACE_FLOOR_DIVIDE', '/=': 'INPLACE_DIVIDE', '<<=': 'INPLACE_LSHIFT', '>>=': 'INPLACE_RSHIFT', ...}
class_name = None
optimized = 0
 
class LocalNameFinder
      Find local names in scope
 
   Methods defined here:
__init__(self, names=())
getLocals(self)
visitAssName(self, node)
visitClass(self, node)
visitDict(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGlobal(self, node)
visitImport(self, node)
visitLambda(self, node)

Data and non-method functions defined here:
__doc__ = 'Find local names in scope'
__module__ = 'compiler.pycodegen'
 
class Module(AbstractCompileMode)
       
   Methods defined here:
compile(self, display=0)
dump(self, f)
getPycHeader(self)

Data and non-method functions defined here:
MAGIC = '-\xed\r\n'
__doc__ = None
__module__ = 'compiler.pycodegen'
mode = 'exec'

Methods inherited from AbstractCompileMode:
__init__(self, source, filename)
_get_tree(self)
getCode(self)
 
class ModuleCodeGenerator(NestedScopeMixin, CodeGenerator)
       
  
Method resolution order:
ModuleCodeGenerator
NestedScopeMixin
CodeGenerator

Methods defined here:
_ModuleCodeGenerator__super_init = __init__(self)
__init__(self, tree)
get_module(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
scopes = None

Methods inherited from NestedScopeMixin:
initClass(self)

Methods inherited from CodeGenerator:
_implicitNameOp(self, prefix, name)
Emit name ops for names generated implicitly by for loops
 
The interpreter generates names that start with a period or
dollar sign.  The symbol table ignores these names because
they aren't present in the program text.
_nameOp(self, prefix, name)
_resolveDots(self, name)
_setupGraphDelegation(self)
_visitAssSequence(self, node, op='UNPACK_SEQUENCE')
_visitFuncOrLambda(self, node, isLambda=0)
binaryOp(self, node, op)
bitOp(self, nodes, op)
checkClass(self)
Verify that class is constructed correctly
delName(self, name)
getCode(self)
Return a code object
isLocalName(self, name)
loadName(self, name)
mangle(self, name)
parseSymbols(self, tree)
set_lineno(self, node, force=0)
Emit SET_LINENO if node has lineno attribute and it is
different than the last lineno emitted.
 
Returns true if SET_LINENO was emitted.
 
There are no rules for when an AST node should have a lineno
attribute.  The transformer and AST code need to be reviewed
and a consistent policy implemented and documented.  Until
then, this method works around missing line numbers.
storeName(self, name)
unaryOp(self, node, op)
visitAdd(self, node)
visitAnd(self, node)
visitAssAttr(self, node)
visitAssList = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssName(self, node)
visitAssTuple = _visitAssSequence(self, node, op='UNPACK_SEQUENCE')
visitAssert(self, node)
visitAssign(self, node)
visitAugAssign(self, node)
visitAugGetattr(self, node, mode)
visitAugName(self, node, mode)
visitAugSlice(self, node, mode)
visitAugSubscript(self, node, mode)
visitBackquote(self, node)
visitBitand(self, node)
visitBitor(self, node)
visitBitxor(self, node)
visitBreak(self, node)
visitCallFunc(self, node)
visitClass(self, node)
visitCompare(self, node)
visitConst(self, node)
visitContinue(self, node)
visitDict(self, node)
visitDiscard(self, node)
visitDiv(self, node)
visitEllipsis(self, node)
visitExec(self, node)
visitExpression(self, node)
visitFloorDiv(self, node)
visitFor(self, node)
visitFrom(self, node)
visitFunction(self, node)
visitGetattr(self, node)
visitGlobal(self, node)
visitIf(self, node)
visitImport(self, node)
visitInvert(self, node)
visitKeyword(self, node)
visitLambda(self, node)
visitLeftShift(self, node)
visitList(self, node)
visitListComp(self, node)
visitListCompFor(self, node)
visitListCompIf(self, node, branch)
visitMod(self, node)
visitModule(self, node)
visitMul(self, node)
visitName(self, node)
visitNot(self, node)
visitOr(self, node)
visitPass(self, node)
visitPower(self, node)
visitPrint(self, node, newline=0)
visitPrintnl(self, node)
visitRaise(self, node)
visitReturn(self, node)
visitRightShift(self, node)
visitSlice(self, node, aug_flag=None)
visitSliceobj(self, node)
visitSub(self, node)
visitSubscript(self, node, aug_flag=None)
visitTest(self, node, jump)
visitTryExcept(self, node)
visitTryFinally(self, node)
visitTuple(self, node)
visitUnaryAdd(self, node)
visitUnaryInvert(self, node)
visitUnarySub(self, node)
visitWhile(self, node)
visitYield(self, node)

Data and non-method functions inherited from CodeGenerator:
ClassGen = None
FunctionGen = None
NameFinder = <class compiler.pycodegen.LocalNameFinder>
Find local names in scope
_CodeGenerator__initialized = None
_CodeGenerator__list_count = 0
_augmented_opcode = {'%=': 'INPLACE_MODULO', '&=': 'INPLACE_AND', '**=': 'INPLACE_POWER', '*=': 'INPLACE_MULTIPLY', '+=': 'INPLACE_ADD', '-=': 'INPLACE_SUBTRACT', '//=': 'INPLACE_FLOOR_DIVIDE', '/=': 'INPLACE_DIVIDE', '<<=': 'INPLACE_LSHIFT', '>>=': 'INPLACE_RSHIFT', ...}
class_name = None
optimized = 0
 
class NestedScopeMixin
      Defines initClass() for nested scoping (Python 2.2-compatible)
 
   Methods defined here:
initClass(self)

Data and non-method functions defined here:
__doc__ = 'Defines initClass() for nested scoping (Python 2.2-compatible)'
__module__ = 'compiler.pycodegen'
 
class OpFinder
       
   Methods defined here:
__init__(self)
visitAssAttr = visitAssName(self, node)
visitAssName(self, node)
visitSubscript = visitAssName(self, node)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'compiler.pycodegen'
 
Functions
            
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing
compile(source, filename, mode, flags=None, dont_inherit=None)
Replacement for builtin compile() function
compileFile(filename, display=0)
findOp(node)
Find the op (DELETE, LOAD, STORE) in an AssTuple tree
generateArgList(arglist)
Generate an arg list marking TupleArgs
is_constant_false(node)
wrap_aug(node)
 
Data
             CO_FUTURE_DIVISION = 8192
CO_GENERATOR = 32
CO_GENERATOR_ALLOWED = 4096
CO_NESTED = 16
CO_NEWLOCALS = 2
CO_VARARGS = 4
CO_VARKEYWORDS = 8
END_FINALLY = 4
EXCEPT = 2
LOOP = 1
SC_CELL = 4
SC_FREE = 3
SC_GLOBAL = 2
SC_LOCAL = 1
TRY_FINALLY = 3
VERSION = 2
__file__ = '/usr/lib/python2.2/compiler/pycodegen.pyc'
__name__ = 'compiler.pycodegen'
callfunc_opcode_info = {(0, 0): 'CALL_FUNCTION', (0, 1): 'CALL_FUNCTION_KW', (1, 0): 'CALL_FUNCTION_VAR', (1, 1): 'CALL_FUNCTION_VAR_KW'}
wrapper = {<class compiler.ast.Getattr>: <class compiler.pycodegen.AugGetattr>, <class compiler.ast.Subscript>: <class compiler.pycodegen.AugSubscript>, <class compiler.ast.Name>: <class compiler.pycodegen.AugName>, <class compiler.ast.Slice>: <class compiler.pycodegen.AugSlice>}