Module Extraction
source code
|
extract_comps(expr)
Extract all comparisons from the expression. |
source code
|
|
|
|
|
extract_vars(expr)
Return a Set of the variables used in an expression. |
source code
|
|
|
_extract_vars_ast(ast,
vars_found)
Appends the asts of the variables used in ast to vars_found. |
source code
|
|
|
|
|
_extract_funcs_ast(ast,
funcs_found)
Append ('name', #arg) for each function used in the ast to funcs_found. |
source code
|
|
Imports:
Slice,
Const,
Raise,
For,
AssTuple,
Mul,
Invert,
RightShift,
AssList,
Add,
Dict,
flatten,
UnaryAdd,
Import,
Print,
Ellipsis,
Sliceobj,
Decorators,
Subscript,
Name,
Node,
Assert,
Return,
Power,
Exec,
CO_VARKEYWORDS,
GenExprFor,
Stmt,
Or,
Break,
CO_VARARGS,
Bitand,
FloorDiv,
Tuple,
Bitxor,
TryExcept,
Not,
nodes,
EmptyNode,
With,
Class,
Mod,
Printnl,
Function,
TryFinally,
GenExprIf,
While,
AssAttr,
Keyword,
GenExpr,
Module,
AugAssign,
List,
Yield,
IfExp,
AssName,
From,
Continue,
Backquote,
Discard,
Div,
Expression,
Assign,
Lambda,
And,
LeftShift,
Compare,
GenExprInner,
CallFunc,
Global,
Getattr,
ListCompIf,
Sub,
ListCompFor,
flatten_nodes,
Pass,
UnarySub,
Bitor,
ListComp,
If,
sets,
AST
Return a Set of the functions used in an expression.
The elements of the Set are ('function_name', #arguments).
|