Module Assign NameStore Str If CompareEq NameLoad Str body ImportFrom alias ImportFrom alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad ImportFrom alias ImportFrom alias Import alias Assign NameStore IfExp CompareEq NameLoad Str NameLoad NameLoad Expr Str ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad Str attr NameLoad decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults kwarg body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Pass decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults body Pass decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Dict Str Str ListLoad Str Str Str Str ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If Call AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIn AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIn AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults kwarg body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr IfExp CompareLt NameLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad Str BinOpSub Call NameLoad NameLoad Num For TupleStore NameStore NameStore Call NameLoad NameLoad body AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str Str Str Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Str Str Str Str decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad NameLoad BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str Expr Call NameLoad Call AttributeLoad Str attr NameLoad NameLoad BinOpAdd ListLoad NameLoad NameLoad keyword NameLoad decorator_list If NameLoad body With Call NameLoad Str body Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Call NameLoad Str Str NameLoad Expr Str
N/A N/A __author__ Chris Tabor (dxdstudio@gmail.com) N/A N/A __name__ __main__ N/A os getcwd os sys N/A N/A N/A N/A sys path append N/A getcwd MOAL.helpers.display Section MOAL.helpers.display print_simple N/A os N/A DEBUG N/A N/A __name__ __main__ True False N/A 
    en.wikipedia.org/wiki/Cohesion_(computer_science)
    For these examples, 'module' is actually considered a class.

    NOTE: some of these classes access properties or methods that do not exist.
    Making it fully compliant is irrelevant to the scope of this project.
    In some cases, the examples will work 100%, but some don't.
 Utilities N/A N/A N/A BAD, BAD, BAD! Grouping based on circumstance or coincidence. add_numbers N/A N/A self nums N/A N/A N/A N/A sum nums N/A get_fullname N/A N/A self user N/A N/A N/A N/A N/A {}. {} {} format N/A user prefix N/A user firstname N/A user lastname N/A format_thing N/A N/A self stuff N/A N/A N/A N/A N/A Formatted: {} format stuff N/A N/A InputsController N/A N/A N/A Grouping based on logical category of functionality or type handle_keyboard N/A N/A self character N/A N/A N/A N/A handle_mouse N/A N/A self x y N/A N/A N/A N/A handle_other N/A N/A self N/A kwargs N/A N/A N/A register_input N/A N/A self name N/A kwargs N/A N/A N/A N/A ProcessUserData N/A N/A N/A Grouping based on procedural and temporal:
    process -> _process -> handle -> error | success process N/A N/A self N/A kwargs N/A N/A data N/A N/A self handle_file N/A N/A N/A N/A N/A self process_data data N/A N/A N/A self success yay! N/A N/A N/A ValueError N/A N/A N/A N/A self add_error Some error! N/A handle_file N/A N/A self N/A N/A N/A N/A process_data N/A N/A self N/A N/A N/A N/A success N/A N/A self msg N/A N/A N/A N/A add_error N/A N/A self msg N/A N/A N/A N/A N/A FileOpener N/A N/A N/A Grouping based on procedure: open -> check perms -> read | error __init__ N/A N/A self N/A N/A N/A N/A self access_permissions N/A read write N/A bob tim angie linda N/A linda angie bob N/A open N/A N/A self user filename N/A N/A N/A N/A N/A self _can_read user N/A N/A N/A N/A self readfile filename N/A N/A N/A N/A self add_error Cannot read this file! N/A _can_read N/A N/A self user N/A N/A N/A N/A N/A user name N/A N/A self access_permissions read N/A _can_write N/A N/A self user N/A N/A N/A N/A N/A user name N/A N/A self access_permissions write N/A N/A HandleUser N/A N/A N/A Grouping based on operating on the same piece or type of data. create N/A N/A self user_id N/A data N/A N/A N/A read N/A N/A self user_id N/A data N/A N/A N/A N/A N/A self store read user_id N/A update N/A N/A self user_id N/A data N/A N/A N/A N/A N/A N/A N/A N/A N/A self store read user_id update data save N/A delete N/A N/A self user_id N/A N/A N/A N/A N/A N/A N/A N/A self store read user_id delete N/A N/A UnixPipe N/A N/A N/A Grouping based on the notion that outputs to one function become
    the input to another, when combined in sequence.
    This is the crux of the UNIX philosophy. __init__ N/A N/A self N/A N/A N/A N/A self data None N/A ls N/A N/A self N/A N/A N/A N/A self data N/A N/A os listdir N/A N/A os getcwd N/A self N/A grep N/A N/A self keyword N/A N/A N/A chunk N/A self data N/A N/A N/A keyword chunk N/A N/A N/A self data chunk N/A self N/A save N/A N/A self filename N/A N/A N/A N/A open filename wb+ newfile N/A N/A N/A N/A newfile write N/A N/A >>> {} format N/A self data N/A self N/A N/A Lexer N/A object N/A N/A Grouping based on specific functions that contribute
    to a single, well-defined goal. __init__ N/A N/A self wrapper_start wrapper_end token_start token_end N/A N/A N/A N/A self wrapper_start wrapper_start N/A N/A self wrapper_end wrapper_end N/A N/A self start token_start N/A N/A self end token_end N/A _fmt N/A N/A self token k count N/A N/A N/A N/A N/A   {}{}{}{} format N/A self start token N/A self end N/A N/A k count N/A _fmt_wrapper N/A N/A self N/A N/A N/A N/A N/A N/A self wrapper_start 
{}
 N/A self wrapper_end N/A tokenize N/A N/A self string N/A N/A N/A tokens N/A N/A string split N/A wrapper N/A N/A self _fmt_wrapper N/A N/A _tokens count N/A N/A N/A len tokens 1 N/A N/A k token N/A enumerate tokens N/A N/A _tokens N/A N/A self _fmt token k count N/A N/A N/A wrapper format _tokens N/A N/A NaiveXMLLexer N/A Lexer N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super NaiveXMLLexer self __init__ <item> </item> <token> </token> N/A N/A SExpressionLexer N/A Lexer N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super SExpressionLexer self __init__ ( ) ( ) N/A N/A _print N/A N/A text title thing N/A N/A N/A members N/A ref N/A ref N/A dir thing N/A N/A N/A N/A ref startswith __ N/A N/A N/A ref endswith __ N/A N/A print_simple N/A N/A {} << {} >> format text title N/A N/A thing members newline False N/A N/A DEBUG N/A N/A N/A Section GRASP High cohesion pattern N/A N/A N/A _print Bad! Utilities (coincidental) Utilities N/A N/A _print Inferior... Inputs (logical) InputsController N/A N/A _print Okay... Processor (temporal) ProcessUserData N/A N/A _print Okay... File opener (procedural) FileOpener N/A N/A _print Very good... User (informational) HandleUser N/A N/A _print Very good... Pipe (sequental) UnixPipe N/A N/A _print Best! Parser (functional) Lexer N/A 
        # Example usage of pipe...
        >>> pipe = UnixPipe()
        >>> pipe.ls().grep('TASKS.md').save('pipetest-123.txt')

        # Example usage of token...
        luther = SExpressionLexer()
        luther = NaiveXMLLexer()
        t = luther.tokenize('Do you know the story of Prometheus? No, of '
                            'course you don't. Prometheus was a god who stole '
                            'the power of fire from the other gods and gave '
                            'control of it to the mortals. In essence, he gave '
                            'us technology, he gave us power.')
        print(t)
        