module documentation

A fallback ast.unparse function that works with a minimal subset of nodes.

Function get_value Same as unparse but accepts None values.
Function unparse Extract a complex value as a string.
Function _get_add_value Undocumented
Function _get_and_value Undocumented
Function _get_arguments_value Undocumented
Function _get_attribute_value Undocumented
Function _get_binop_value Undocumented
Function _get_bitand_value Undocumented
Function _get_bitor_value Undocumented
Function _get_bitxor_value Undocumented
Function _get_boolop_value Undocumented
Function _get_bytes_value Undocumented
Function _get_call_value Undocumented
Function _get_compare_value Undocumented
Function _get_comprehension_value Undocumented
Function _get_constant_value Undocumented
Function _get_constant_value_no_repr Undocumented
Function _get_dict_value Undocumented
Function _get_dictcomp_value Undocumented
Function _get_div_value Undocumented
Function _get_ellipsis_value Undocumented
Function _get_eq_value Undocumented
Function _get_floordiv_value Undocumented
Function _get_formatted_value Undocumented
Function _get_generatorexp_value Undocumented
Function _get_gt_value Undocumented
Function _get_gte_value Undocumented
Function _get_ifexp_value Undocumented
Function _get_in_value Undocumented
Function _get_index_value Undocumented
Function _get_invert_value Undocumented
Function _get_is_value Undocumented
Function _get_isnot_value Undocumented
Function _get_joinedstr_value Undocumented
Function _get_keyword_value Undocumented
Function _get_lambda_value Undocumented
Function _get_list_value Undocumented
Function _get_listcomp_value Undocumented
Function _get_lshift_value Undocumented
Function _get_lt_value Undocumented
Function _get_lte_value Undocumented
Function _get_matmult_value Undocumented
Function _get_mod_value Undocumented
Function _get_mult_value Undocumented
Function _get_name_value Undocumented
Function _get_nameconstant_value Undocumented
Function _get_not_value Undocumented
Function _get_noteq_value Undocumented
Function _get_notin_value Undocumented
Function _get_num_value Undocumented
Function _get_or_value Undocumented
Function _get_pow_value Undocumented
Function _get_rshift_value Undocumented
Function _get_set_value Undocumented
Function _get_setcomp_value Undocumented
Function _get_slice_value Undocumented
Function _get_starred_value Undocumented
Function _get_str_value Undocumented
Function _get_sub_value Undocumented
Function _get_subscript_value Undocumented
Function _get_tuple_value Undocumented
Function _get_uadd_value Undocumented
Function _get_unaryop_value Undocumented
Function _get_usub_value Undocumented
Function _get_value Undocumented
Function _get_yield_value Undocumented
Variable _node_value_map Undocumented
def get_value(node): (source)

Same as unparse but accepts None values.

Parameters
node:ast.AST|NoneUndocumented
Returns
str|NoneUndocumented
def unparse(node): (source)

Extract a complex value as a string.

Parameters
node:ast.ASTThe node to extract the value from.
Returns
strThe unparsed code of the node.
def _get_add_value(node): (source)

Undocumented

Parameters
node:ast.AddUndocumented
Returns
strUndocumented
def _get_and_value(node): (source)

Undocumented

Parameters
node:ast.AndUndocumented
Returns
strUndocumented
def _get_arguments_value(node): (source)

Undocumented

Parameters
node:ast.argumentsUndocumented
Returns
strUndocumented
def _get_attribute_value(node): (source)

Undocumented

Parameters
node:ast.AttributeUndocumented
Returns
strUndocumented
def _get_binop_value(node): (source)

Undocumented

Parameters
node:ast.BinOpUndocumented
Returns
strUndocumented
def _get_bitand_value(node): (source)

Undocumented

Parameters
node:ast.BitAndUndocumented
Returns
strUndocumented
def _get_bitor_value(node): (source)

Undocumented

Parameters
node:ast.BitOrUndocumented
Returns
strUndocumented
def _get_bitxor_value(node): (source)

Undocumented

Parameters
node:ast.BitXorUndocumented
Returns
strUndocumented
def _get_boolop_value(node): (source)

Undocumented

Parameters
node:ast.BoolOpUndocumented
Returns
strUndocumented
def _get_bytes_value(node): (source)

Undocumented

Parameters
node:ast.BytesUndocumented
Returns
strUndocumented
def _get_call_value(node): (source)

Undocumented

Parameters
node:ast.CallUndocumented
Returns
strUndocumented
def _get_compare_value(node): (source)

Undocumented

Parameters
node:ast.CompareUndocumented
Returns
strUndocumented
def _get_comprehension_value(node): (source)

Undocumented

Parameters
node:ast.comprehensionUndocumented
Returns
strUndocumented
def _get_constant_value(node): (source)

Undocumented

Parameters
node:ast.ConstantUndocumented
Returns
strUndocumented
def _get_constant_value_no_repr(node): (source)

Undocumented

Parameters
node:ast.ConstantUndocumented
Returns
strUndocumented
def _get_dict_value(node): (source)

Undocumented

Parameters
node:ast.DictUndocumented
Returns
strUndocumented
def _get_dictcomp_value(node): (source)

Undocumented

Parameters
node:ast.DictCompUndocumented
Returns
strUndocumented
def _get_div_value(node): (source)

Undocumented

Parameters
node:ast.DivUndocumented
Returns
strUndocumented
def _get_ellipsis_value(node): (source)

Undocumented

Parameters
node:ast.EllipsisUndocumented
Returns
strUndocumented
def _get_eq_value(node): (source)

Undocumented

Parameters
node:ast.EqUndocumented
Returns
strUndocumented
def _get_floordiv_value(node): (source)

Undocumented

Parameters
node:ast.FloorDivUndocumented
Returns
strUndocumented
def _get_formatted_value(node): (source)

Undocumented

Parameters
node:ast.FormattedValueUndocumented
Returns
strUndocumented
def _get_generatorexp_value(node): (source)

Undocumented

Parameters
node:ast.GeneratorExpUndocumented
Returns
strUndocumented
def _get_gt_value(node): (source)

Undocumented

Parameters
node:ast.NotEqUndocumented
Returns
strUndocumented
def _get_gte_value(node): (source)

Undocumented

Parameters
node:ast.NotEqUndocumented
Returns
strUndocumented
def _get_ifexp_value(node): (source)

Undocumented

Parameters
node:ast.IfExpUndocumented
Returns
strUndocumented
def _get_in_value(node): (source)

Undocumented

Parameters
node:ast.InUndocumented
Returns
strUndocumented
def _get_index_value(node): (source)

Undocumented

Parameters
node:ast.IndexUndocumented
Returns
strUndocumented
def _get_invert_value(node): (source)

Undocumented

Parameters
node:ast.InvertUndocumented
Returns
strUndocumented
def _get_is_value(node): (source)

Undocumented

Parameters
node:ast.IsUndocumented
Returns
strUndocumented
def _get_isnot_value(node): (source)

Undocumented

Parameters
node:ast.IsNotUndocumented
Returns
strUndocumented
def _get_joinedstr_value(node): (source)

Undocumented

Parameters
node:ast.JoinedStrUndocumented
Returns
strUndocumented
def _get_keyword_value(node): (source)

Undocumented

Parameters
node:ast.keywordUndocumented
Returns
strUndocumented
def _get_lambda_value(node): (source)

Undocumented

Parameters
node:ast.LambdaUndocumented
Returns
strUndocumented
def _get_list_value(node): (source)

Undocumented

Parameters
node:ast.ListUndocumented
Returns
strUndocumented
def _get_listcomp_value(node): (source)

Undocumented

Parameters
node:ast.ListCompUndocumented
Returns
strUndocumented
def _get_lshift_value(node): (source)

Undocumented

Parameters
node:ast.LShiftUndocumented
Returns
strUndocumented
def _get_lt_value(node): (source)

Undocumented

Parameters
node:ast.NotEqUndocumented
Returns
strUndocumented
def _get_lte_value(node): (source)

Undocumented

Parameters
node:ast.NotEqUndocumented
Returns
strUndocumented
def _get_matmult_value(node): (source)

Undocumented

Parameters
node:ast.MatMultUndocumented
Returns
strUndocumented
def _get_mod_value(node): (source)

Undocumented

Parameters
node:ast.ModUndocumented
Returns
strUndocumented
def _get_mult_value(node): (source)

Undocumented

Parameters
node:ast.MultUndocumented
Returns
strUndocumented
def _get_name_value(node): (source)

Undocumented

Parameters
node:ast.NameUndocumented
Returns
strUndocumented
def _get_nameconstant_value(node): (source)

Undocumented

Parameters
node:ast.NameConstantUndocumented
Returns
strUndocumented
def _get_not_value(node): (source)

Undocumented

Parameters
node:ast.NotUndocumented
Returns
strUndocumented
def _get_noteq_value(node): (source)

Undocumented

Parameters
node:ast.NotEqUndocumented
Returns
strUndocumented
def _get_notin_value(node): (source)

Undocumented

Parameters
node:ast.NotInUndocumented
Returns
strUndocumented
def _get_num_value(node): (source)

Undocumented

Parameters
node:ast.NumUndocumented
Returns
strUndocumented
def _get_or_value(node): (source)

Undocumented

Parameters
node:ast.OrUndocumented
Returns
strUndocumented
def _get_pow_value(node): (source)

Undocumented

Parameters
node:ast.PowUndocumented
Returns
strUndocumented
def _get_rshift_value(node): (source)

Undocumented

Parameters
node:ast.RShiftUndocumented
Returns
strUndocumented
def _get_set_value(node): (source)

Undocumented

Parameters
node:ast.SetUndocumented
Returns
strUndocumented
def _get_setcomp_value(node): (source)

Undocumented

Parameters
node:ast.SetCompUndocumented
Returns
strUndocumented
def _get_slice_value(node): (source)

Undocumented

Parameters
node:ast.SliceUndocumented
Returns
strUndocumented
def _get_starred_value(node): (source)

Undocumented

Parameters
node:ast.StarredUndocumented
Returns
strUndocumented
def _get_str_value(node): (source)

Undocumented

Parameters
node:ast.StrUndocumented
Returns
strUndocumented
def _get_sub_value(node): (source)

Undocumented

Parameters
node:ast.SubUndocumented
Returns
strUndocumented
def _get_subscript_value(node): (source)

Undocumented

Parameters
node:ast.SubscriptUndocumented
Returns
strUndocumented
def _get_tuple_value(node): (source)

Undocumented

Parameters
node:ast.TupleUndocumented
Returns
strUndocumented
def _get_uadd_value(node): (source)

Undocumented

Parameters
node:ast.UAddUndocumented
Returns
strUndocumented
def _get_unaryop_value(node): (source)

Undocumented

Parameters
node:ast.UnaryOpUndocumented
Returns
strUndocumented
def _get_usub_value(node): (source)

Undocumented

Parameters
node:ast.USubUndocumented
Returns
strUndocumented
def _get_value(node): (source)

Undocumented

Parameters
node:ast.ASTUndocumented
Returns
strUndocumented
def _get_yield_value(node): (source)

Undocumented

Parameters
node:ast.YieldUndocumented
Returns
strUndocumented
_node_value_map: dict[Type[ast.AST], Callable[[Any], str]] = (source)

Undocumented