1
# This file describes the nodes of the AST in ast.py. The module is
2
# generated by astgen.py.
3
# The descriptions use the following special notation to describe
4
# properties of the children:
5
# * this child is not a node
6
# ! this child is a sequence that contains nodes in it
7
# & this child may be set to None
8
# = ... a default value for the node constructor (optional args)
10
# If you add node types here, please be sure to update the list of
11
# Node types in Doc/lib/asttable.tex.
15
Function: decorators&, name*, argnames*, defaults!, flags*, doc*, code
16
Lambda: argnames*, defaults!, flags*, code
17
Class: name*, bases!, doc*, code, decorators& = None
21
For: assign, list, body, else_&
22
While: test, body, else_&
23
With: expr, vars&, body
25
IfExp: test, then, else_
26
Exec: expr, locals&, globals&
27
From: modname*, names*, level*
29
Raise: expr1&, expr2&, expr3&
30
TryFinally: body, final
31
TryExcept: body, handlers!, else_&
36
Printnl: nodes!, dest&
38
AugAssign: node, op*, expr
42
AssName: name*, flags*
43
AssAttr: expr, attrname*, flags*
44
ListComp: expr, quals!
45
ListCompFor: assign, list, ifs!
48
GenExprInner: expr, quals!
49
GenExprFor: assign, iter, ifs!
58
Getattr: expr, attrname*
59
CallFunc: node, args!, star_args& = None, dstar_args& = None
61
Subscript: expr, flags*, subs!
64
Slice: expr, flags*, lower&, upper&
72
LeftShift: (left, right)
73
RightShift: (left, right)
80
FloorDiv: (left, right)
86
self.varargs = self.kwargs = None
87
if flags & CO_VARARGS:
89
if flags & CO_VARKEYWORDS:
93
self.varargs = self.kwargs = None
94
if flags & CO_VARARGS:
96
if flags & CO_VARKEYWORDS:
100
self.argnames = ['.0']
101
self.varargs = self.kwargs = None
104
self.is_outmost = False