Package SloppyCell :: Package ExprManip :: Module Extraction
[hide private]

Module Extraction

source code

Functions [hide private]
 
extract_comps(expr)
Extract all comparisons from the expression.
source code
 
_extract_comps_ast(ast, comps_found) 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(expr)
Return a Set of the functions used in an expression.
source code
 
_extract_funcs_ast(ast, funcs_found)
Append ('name', #arg) for each function used in the ast to funcs_found.
source code
Variables [hide private]
  extract_vars_cache = {}

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


Function Details [hide private]

extract_funcs(expr)

source code 

Return a Set of the functions used in an expression.

The elements of the Set are ('function_name', #arguments).