src.utils.func module

file for function manipulation. Methods to use: - param_names - returns names of args - chainFunctions - chains passed fucntions - executeAlongList - executes a function for every list element

src.utils.func.chainFunctions(kwargs, functions)[source]

chains multiple functions with each other. assumes that the returnvalues of the functionlist is equal to the arguments the next function has.

Parameters:
  • kwargs (dict) – the kwargs, used for the first function in the list

  • functions (list[function]) – a list of any function

Returns:

returnValue – the return of the last function

Return type:

object

src.utils.func.executeAlongList(kwargslist, function)[source]

Executes a function for every element in the passed list.

Parameters:
  • kwargslist (list[dict]) – a list of kwargs, which are executed onto the passed function

  • function (function) – any function

Returns:

returns – a list of every return per arg in kwargslist

Return type:

list

src.utils.func.param_names(fn)[source]

returns the names of a functions parameters as a list of strings

Parameters:

fn – the name of a any python function

Returns:

arglist – a list with all args of fn

Return type:

list[str]

Dependency Diagrams (without externals):

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.core.analyse.plugin" -> "src.utils.func";
}

Import dependencies (collapsed)

Dependency Diagrams:

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.core.analyse.plugin" -> "src.utils.func";
}

Import dependencies (collapsed)