104 lines · 2.5 KB · Text
RawDownload
# This file describes the nodes of the AST in ast.py.  The module is# generated by astgen.py.  # The descriptions use the following special notation to describe# properties of the children:#    *   this child is not a node#    !   this child is a sequence that contains nodes in it#    &   this child may be set to None#  = ... a default value for the node constructor (optional args)## If you add node types here, please be sure to update the list of # Node types in Doc/lib/asttable.tex.Module: doc*, nodeStmt: nodes!Decorators: nodes!Function: decorators&, name*, argnames*, defaults!, flags*, doc*, codeLambda: argnames*, defaults!, flags*, codeClass: name*, bases!, doc*, codePass: Break: Continue: For: assign, list, body, else_&While: test, body, else_&With: expr, vars&, bodyIf: tests!, else_&IfExp: test, then, else_Exec: expr, locals&, globals&From: modname*, names*, level*Import: names*Raise: expr1&, expr2&, expr3&TryFinally: body, finalTryExcept: body, handlers!, else_&Return: valueYield: valueConst: value*Print: nodes!, dest&Printnl: nodes!, dest&Discard: exprAugAssign: node, op*, exprAssign: nodes!, exprAssTuple: nodes!AssList: nodes!AssName: name*, flags*AssAttr: expr, attrname*, flags*ListComp: expr, quals!ListCompFor: assign, list, ifs!ListCompIf: testGenExpr: codeGenExprInner: expr, quals!GenExprFor: assign, iter, ifs!GenExprIf: testList: nodes!Dict: items!Not: exprCompare: expr, ops!Name: name*Global: names*Backquote: exprGetattr: expr, attrname*CallFunc: node, args!, star_args& = None, dstar_args& = NoneKeyword: name*, exprSubscript: expr, flags*, subs!Ellipsis: Sliceobj: nodes!Slice: expr, flags*, lower&, upper&Assert: test, fail&Tuple: nodes!Or: nodes!And: nodes!Bitor: nodes!Bitxor: nodes!Bitand: nodes!LeftShift: (left, right)RightShift: (left, right)Add: (left, right)Sub: (left, right)Mul: (left, right)Div: (left, right)Mod: (left, right)Power: (left, right)FloorDiv: (left, right)UnaryAdd: exprUnarySub: exprInvert: expr init(Function):    self.varargs = self.kwargs = None    if flags & CO_VARARGS:        self.varargs = 1    if flags & CO_VARKEYWORDS:        self.kwargs = 1 init(Lambda):    self.varargs = self.kwargs = None    if flags & CO_VARARGS:        self.varargs = 1    if flags & CO_VARKEYWORDS:        self.kwargs = 1 init(GenExpr):    self.argnames = ['[outmost-iterable]']    self.varargs = self.kwargs = None init(GenExprFor):    self.is_outmost = False