module documentation

Undocumented

Function color Undocumented
Function color2 Undocumented
Function color​_re Undocumented
Function extract​_expr Undocumented
Function test​_ast​_annotation Undocumented
Function test​_ast​_attribute Undocumented
Function test​_ast​_bin​_op Undocumented
Function test​_ast​_bool​_op Undocumented
Function test​_ast​_call Undocumented
Function test​_ast​_call​_args Undocumented
Function test​_ast​_constants Undocumented
Function test​_ast​_dict Undocumented
Function test​_ast​_ellipsis Undocumented
Function test​_ast​_list​_tuple Undocumented
Function test​_ast​_regex Undocumented
Function test​_ast​_set Undocumented
Function test​_ast​_slice Undocumented
Function test​_ast​_unary​_op Undocumented
Function test​_buggy​_live​_object Undocumented
Function test​_bytes​_multiline Undocumented
Function test​_bytes​_str Binary strings (bytes) are handled properly:
Function test​_custom​_live​_object Undocumented
Function test​_dictionaries Dicts are treated just like lists, except that the ":" is also tagged as "op".
Function test​_frozenset Undocumented
Function test​_inline​_list No summary
Function test​_line​_wrapping Undocumented
Function test​_long​_numbers Long ints will get wrapped if they're big enough.
Function test​_multiline​_list Undocumented
Function test​_multiline​_list2 Undocumented
Function test​_multiline​_set Undocumented
Function test​_operator​_precedences Undocumented
Function test​_re​_branching Undocumented
Function test​_re​_char​_classes Undocumented
Function test​_re​_flags Undocumented
Function test​_re​_literals Undocumented
Function test​_re​_lookahead​_behinds Undocumented
Function test​_re​_multiline Undocumented
Function test​_re​_named​_groups Undocumented
Function test​_re​_not​_literal Undocumented
Function test​_re​_ranges Undocumented
Function test​_re​_references Undocumented
Function test​_re​_repeats Undocumented
Function test​_re​_subpatterns Undocumented
Function test​_repr​_text Test a few representations, with a plain text version.
Function test​_simple​_types Integers, floats, None, and complex numbers get printed using str, with no syntax highlighting.
Function test​_strings Strings have their quotation marks tagged as 'quote'. Characters are escaped using the 'string-escape' encoding.
Function test​_strings​_multiline Strings containing newlines are automatically rendered as multiline strings.
Function test​_strings​_quote Currently, the "'" quote is always used, because that's what the 'string-escape' encoding expects.
Function test​_strings​_special​_chars Undocumented
Function test​_summary To generate summary-reprs, use maxlines=1 and linebreakok=False:
Function test​_tuples​_one​_value Tuples that contains only one value need an ending comma.
Function test​_unicode​_str Unicode strings are handled properly.
def color(v, linebreakok=True, maxlines=5, linelen=40):

Undocumented

Parameters
v:AnyUndocumented
linebreakok:boolUndocumented
maxlines:intUndocumented
linelen:intUndocumented
Returns
strUndocumented
def color2(v):

Undocumented

Parameters
v:AnyUndocumented
Returns
strUndocumented
def color_re(s, check_roundtrip=True):

Undocumented

Parameters
s:Union[bytes, str]Undocumented
check​_roundtrip:boolUndocumented
Returns
strUndocumented
def extract_expr(_ast):

Undocumented

Parameters
​_ast:ast.ModuleUndocumented
Returns
ast.ASTUndocumented
def test_ast_annotation():

Undocumented

def test_ast_attribute():

Undocumented

def test_ast_bin_op():

Undocumented

def test_ast_bool_op():

Undocumented

def test_ast_call():

Undocumented

def test_ast_call_args():

Undocumented

def test_ast_constants():

Undocumented

def test_ast_dict():

Undocumented

def test_ast_ellipsis():

Undocumented

def test_ast_list_tuple():

Undocumented

def test_ast_regex():

Undocumented

def test_ast_set():

Undocumented

def test_ast_slice():

Undocumented

def test_ast_unary_op():

Undocumented

def test_buggy_live_object():

Undocumented

def test_bytes_multiline():

Undocumented

def test_bytes_str():
Binary strings (bytes) are handled properly:
def test_custom_live_object():

Undocumented

def test_dictionaries():
Dicts are treated just like lists, except that the ":" is also tagged as "op".
def test_frozenset():

Undocumented

def test_inline_list():
Lists, tuples, and sets are all colorized using the same method. The braces and commas are tagged with "op". If the value can fit on the current line, it is displayed on one line. Otherwise, each value is listed on a separate line, indented by the size of the open-bracket.
def test_line_wrapping():

Undocumented

def test_long_numbers():
Long ints will get wrapped if they're big enough.
def test_multiline_list():

Undocumented

def test_multiline_list2():

Undocumented

def test_multiline_set():

Undocumented

def test_operator_precedences():

Undocumented

def test_re_branching():

Undocumented

def test_re_char_classes():

Undocumented

def test_re_flags():

Undocumented

def test_re_literals():

Undocumented

def test_re_lookahead_behinds():

Undocumented

def test_re_multiline():

Undocumented

def test_re_named_groups():

Undocumented

def test_re_not_literal():

Undocumented

def test_re_ranges():

Undocumented

def test_re_references():

Undocumented

def test_re_repeats():

Undocumented

def test_re_subpatterns():

Undocumented

def test_repr_text():
Test a few representations, with a plain text version.
def test_simple_types():
Integers, floats, None, and complex numbers get printed using str, with no syntax highlighting.
def test_strings():
Strings have their quotation marks tagged as 'quote'. Characters are escaped using the 'string-escape' encoding.
def test_strings_multiline():
Strings containing newlines are automatically rendered as multiline strings.
def test_strings_quote():
Currently, the "'" quote is always used, because that's what the 'string-escape' encoding expects.
def test_strings_special_chars():

Undocumented

def test_summary():
To generate summary-reprs, use maxlines=1 and linebreakok=False:
def test_tuples_one_value():
Tuples that contains only one value need an ending comma.
def test_unicode_str():
Unicode strings are handled properly.