Code Tools#

copy_doc(source_f)

code_lines_to_func(lines, func_name, ...[, ...])

get_identifiers(expr[, include_numbers])

Return all the identifiers in a given string expr, that is everything that matches a programming language variable like expression, which is here implemented as the regexp \b[A-Za-z_][A-Za-z0-9_]*\b.

indent(text[, num_tabs, spaces_per_tab, tab])

deindent(text[, num_tabs, spaces_per_tab, ...])

word_replace(expr, substitutions[, exclude_dot])

Applies a dict of word substitutions.

is_lambda_function(func)

Check whether the function is a lambda function.

get_main_code(func[, codes])

Get the main function _code string.

get_func_source(func)

change_func_name(f, name)