Module ImportFrom alias alias alias alias Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str TryExcept body Expr NameLoad handlers ExceptHandler body Assign NameStore NameLoad Import alias Import alias Import alias ImportFrom alias ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad NameLoad decorator_list Assign NameStore Dict Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Return SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body If NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse If NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad orelse Assign TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad orelse If AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore ListLoad If AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Assign NameStore BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore AttributeLoad NameLoad attr body If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore BinOpAdd BinOpAdd NameLoad Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad orelse Assign NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num orelse Assign AttributeStore NameLoad attr NameLoad If NameLoad body If CompareGt Call NameLoad NameLoad Num body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num orelse Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad kwarg body Expr Str If CompareIs NameLoad NameLoad body If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Num If NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Assign NameStore ListLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpAdd Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Expr Str If BoolOpAnd NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num orelse If Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore ListLoad Str If NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad Str attr NameLoad orelse Assign NameStore Call AttributeLoad Str attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore ListLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad Call AttributeLoad Str attr NameLoad NameLoad orelse If Call NameLoad NameLoad Str body Assign NameStore ListComp Call AttributeLoad Str attr NameLoad NameLoad comprehension NameStore NameLoad orelse Assign NameStore ListLoad Call AttributeLoad Str attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list
N/A __future__ print_function division absolute_import unicode_literals N/A 
Wrapper for Vowpal Wabbit executable

TODO: 
-Detect VW version in unit tests; for command line generation scenarios,
    unit tests should detect whether it works as expected.
-Scenario assistance; e.g. caching examples for reuse in multi-pass
    (This would make good example code also.)
    -Abstraction for passes (with automatic usage of example cache)
-Example for README: Active learning interface
-Sklearn compatibility (like vowpal_porpoise)


by Michael J.T. O'Kelly, 2014-2-24
 N/A __author__ Michael J.T. O'Kelly N/A __email__ mokelly@gmail.com N/A __version__ 0.3.0 N/A N/A N/A basestring N/A N/A N/A N/A basestring str N/A logging N/A re N/A pexpect N/A active_learner WabbitInvalidCharacter N/A ValueError N/A N/A N/A N/A validation_regex N/A N/A re compile  |:|\| validate_vw_string N/A N/A s N/A N/A N/A Throw a WabbitInvalidCharacter exception if the string is
    not a 
    (http://stats.stackexchange.com/questions/28877/finding-the-best-features-in-interaction-models)
     N/A N/A N/A validation_regex search s N/A N/A N/A WabbitInvalidCharacter s N/A N/A escape_dict N/A : | \_ \; \\ escape_vw_character N/A N/A special_character_re_match N/A N/A N/A special_character N/A N/A special_character_re_match group N/A N/A escape_dict N/A special_character N/A escape_vw_string N/A N/A s N/A N/A N/A escaped_s N/A N/A validation_regex sub escape_vw_character s N/A escaped_s N/A Namespace N/A N/A N/A Abstraction of Namespace part of VW example lines __init__ N/A N/A self name scale features escape validate cache_string N/A None None None True True False N/A N/A Create a namespace with given (optional) name and importance,
        initialized with any given features (described in add_features()).
        If 'validate', name and features are validated for compatibility
            with VW's reserved characters, throwing a WabbitInvalidCharacter
            exception.
        If 'escape', any invalid characters are replaced with escape characters.
            ('escape' mode supersedes 'vaildate' mode.)
        If 'cache_string', the results of any to_string() call are cached
            permanently, ignoring any further changes to self.  (This can
            speed things up if this Namespace is re-used.)
         N/A N/A self name name N/A N/A self scale scale N/A N/A self validate validate N/A N/A self escape escape N/A N/A self _string None N/A N/A self features N/A N/A N/A self cache_string cache_string N/A name N/A N/A escape N/A N/A N/A self name N/A escape_vw_string N/A self name N/A N/A validate N/A N/A N/A validate_vw_string N/A self name N/A features N/A N/A N/A N/A self add_features features N/A add_features N/A N/A self features N/A N/A N/A Add features to this namespace.
        features: An iterable of features.  A feature may be either
            1) A VW label (not containing characters from escape_dict.keys(),
                unless 'escape' mode is on)
            2) A tuple (label, value) where value is any float
         N/A feature features N/A N/A N/A isinstance feature basestring N/A N/A label feature N/A value None N/A N/A N/A label value feature N/A N/A N/A self add_feature label value N/A add_feature N/A N/A self label value N/A None N/A N/A 
        label: A VW label (not containing characters from escape_dict.keys(),
            unless 'escape' mode is on)
        value: float giving the weight or magnitude of this feature
         N/A N/A self escape N/A N/A label N/A escape_vw_string label N/A N/A N/A self validate N/A N/A N/A validate_vw_string label N/A feature N/A label value N/A N/A N/A N/A self features append feature N/A to_string N/A N/A self N/A N/A N/A Export this namespace to a string suitable for incorporation
        in a VW example line, e.g.
        'MetricFeatures:3.28 height:1.5 length:2.0 '
         N/A N/A N/A self _string None N/A N/A tokens N/A N/A N/A self name N/A N/A N/A self scale N/A N/A token N/A N/A N/A self name : N/A str N/A self scale N/A N/A token N/A self name N/A N/A token N/A N/A N/A tokens append token N/A N/A label value N/A self features N/A N/A N/A value None N/A N/A token label N/A N/A token N/A N/A label : N/A str value N/A N/A N/A tokens append token N/A N/A N/A tokens append N/A output N/A N/A join tokens N/A N/A self cache_string N/A N/A N/A self _string output N/A N/A output N/A self _string N/A output N/A export_features N/A N/A self delimiter N/A \ N/A N/A Export the features from this namespace as a list of feature tokens
        with the namespace name prepended (delimited by 'delimiter').

        Example:
        >>> namespace = Namespace('name1', features=['feature1', 'feature2'])
        >>> print namespace.export_features()
        ['name1\feature1', 'name1\feature2']
         N/A result_list N/A N/A feature N/A self features N/A N/A result N/A N/A {}{}{} format N/A self name delimiter feature N/A N/A N/A result_list append result N/A result_list N/A N/A VWResult N/A N/A N/A Parses VW string output into consistent structure __init__ N/A N/A self result_string active_mode N/A False N/A N/A Set 'active_mode' to True to parse results in
        an Active Learning context. N/A N/A self raw_output result_string N/A result_list N/A N/A token N/A N/A result_string split N/A N/A N/A N/A result N/A float token N/A N/A N/A result_list append result N/A N/A N/A ValueError N/A N/A N/A N/A logging debug N/A N/A Ignoring non-float token {} format token N/A N/A self value_list result_list N/A result_list N/A N/A N/A self prediction N/A result_list N/A 0 N/A N/A N/A self prediction None N/A active_mode N/A N/A N/A N/A len result_list 1 N/A N/A N/A self importance N/A result_list N/A 1 N/A N/A N/A self importance 0.0 N/A __str__ N/A N/A self N/A N/A N/A N/A str N/A self __dict__ N/A N/A VW N/A N/A N/A Wrapper for VW executable, handling online input and outputs. __init__ N/A N/A self command active_mode dummy_mode N/A None False False kwargs N/A N/A 'command' is the full command-line necessary to run VW.  E.g.
        vw --loss_function logistic -p /dev/stdout --quiet
        -p /dev/stdout --quiet is mandatory for compatibility,
        and certain options like 
            --save_resume
        are suggested, while some options make no sense in this context:
            -d
            --passes
        wabbit_wappa.py does not support any mode that turns off piping to
        stdin or stdout

        active_mode: Launch VW in port-listening active learning mode, controlled via
            a simulated subprocess.
        dummy_mode: Don't actually start any VW process.  (Used for assembling
            VW command lines separately.)

        If no command is given, any additional keyword arguments are passed to
            make_command_line() and the resulting command is used.  (This provides
            sensible defaults.)
         N/A N/A command None N/A N/A active_mode N/A N/A active_settings N/A N/A active_learner get_active_default_settings N/A N/A N/A active_settings update kwargs N/A kwargs active_settings N/A port N/A N/A kwargs get port N/A command N/A make_command_line kwargs N/A N/A self active_mode active_mode N/A N/A self dummy_mode dummy_mode N/A dummy_mode N/A N/A N/A self vw_process None N/A N/A active_mode N/A N/A N/A self vw_process N/A N/A active_learner ActiveVWProcess command port port N/A N/A N/A self vw_process N/A N/A pexpect spawn command N/A N/A N/A self vw_process delaybeforesend 0 N/A N/A N/A N/A self vw_process setecho False N/A N/A N/A logging info N/A N/A Started VW({}) format command N/A N/A self command command N/A N/A self namespaces N/A N/A N/A self _line None N/A send_line N/A N/A self line parse_result N/A True N/A N/A Submit a raw line of text to the VW instance, returning a 
        VWResult() object.

        If 'parse_result' is False, ignore the result and return None.
         N/A N/A N/A N/A self vw_process sendline line N/A result N/A N/A self _get_response parse_result parse_result N/A result N/A _get_response N/A N/A self parse_result N/A True N/A N/A If 'parse_result' is False, ignore the received output and return None. N/A N/A N/A N/A self vw_process expect_exact searchwindowsize -1 N/A parse_result N/A N/A output N/A N/A self vw_process before N/A result_struct N/A VWResult output active_mode N/A self active_mode N/A N/A result_struct None N/A result_struct N/A send_example N/A N/A self N/A args kwargs N/A N/A Send a labeled or unlabeled example to the VW instance.
        If 'parse_result' kwarg is False, ignore the result and return None.

        All other parameters are passed to self.send_line().

        Returns a VWResult object.
         N/A parse_result N/A N/A kwargs pop parse_result True N/A line N/A N/A self make_line args kwargs N/A result N/A N/A self send_line line parse_result parse_result N/A result N/A make_line N/A N/A self response importance base tag features namespaces N/A None None None None None None N/A N/A Makes and returns an example string in VW syntax.
        If given, 'response', 'importance', 'base', and 'tag' are used
        to label the example.  Features for the example come from
        any given features or namespaces, as well as any previously
        added namespaces (using them up in the process).
         N/A N/A namespaces None N/A N/A N/A N/A self add_namespaces namespaces N/A N/A features None N/A N/A namespace N/A Namespace features features N/A N/A N/A self add_namespace namespace N/A substrings N/A N/A tokens N/A N/A N/A response None N/A N/A token N/A str response N/A N/A N/A tokens append token N/A N/A importance None N/A N/A token N/A str importance N/A N/A N/A tokens append token N/A N/A base None N/A N/A token N/A str base N/A N/A N/A tokens append token N/A N/A tag None N/A N/A token N/A ' N/A str tag N/A N/A N/A tokens append token N/A N/A token N/A N/A N/A tokens append token N/A substring N/A N/A join tokens N/A N/A N/A substrings append substring N/A N/A self namespaces N/A N/A namespace N/A self namespaces N/A N/A substring N/A N/A namespace to_string N/A N/A N/A substrings append substring N/A N/A N/A N/A substrings append N/A line N/A N/A | join substrings N/A N/A self _line line N/A N/A self namespaces N/A N/A line N/A add_namespace N/A N/A self N/A args kwargs N/A N/A Accepts two calling patterns:
        add_namespace(namespace): queue a preexisting namespace onto
            this VW instance.
        add_namespace(name, scale, features, ...): Pass all args and kwargs
            to the Namespace constructor to make a new Namespace instance,
            and queue it to this VW instance.

        Returns self (so that this command can be chained).
         N/A N/A args N/A isinstance N/A args N/A 0 Namespace N/A N/A namespace N/A args N/A 0 N/A N/A N/A isinstance N/A N/A kwargs get namespace Namespace N/A N/A namespace N/A N/A kwargs get namespace N/A N/A namespace N/A Namespace args kwargs N/A N/A N/A N/A self namespaces append namespace N/A self N/A add_namespaces N/A N/A self namespaces N/A N/A N/A Add these namespaces sequentially.
        Returns self (so that this command can be chained). N/A namespace namespaces N/A N/A N/A N/A self add_namespace namespace N/A self N/A get_prediction N/A N/A self features tag namespaces N/A None None None N/A N/A Send an unlabeled example to the trained VW instance.
        Uses any given features or namespaces, as well as any previously
        added namespaces (using them up in the process).

        Returns a VWResult object. N/A N/A features None N/A N/A namespace N/A Namespace features features N/A N/A N/A self add_namespace namespace N/A result N/A N/A self send_example tag tag namespaces namespaces N/A result N/A save_model N/A N/A self model_filename N/A N/A N/A Pass a "command example" to the VW subprocess requesting
        that the current model be serialized to model_filename immediately.
         N/A line N/A N/A save_{}| format model_filename N/A N/A N/A N/A self vw_process sendline line N/A close N/A N/A self N/A N/A N/A Shut down the VW process. N/A N/A N/A N/A self vw_process close N/A N/A make_command_line N/A N/A predictions quiet save_resume q_colon N/A /dev/stdout True True None kwargs N/A N/A Construct a command line for VW, with each named argument corresponding
    to a VW option.
    Single character keys are mapped to single-dash options,
    e.g. 'b=20' yields '-b 20',
    while multiple character keys map to double-dash options:
        'quiet=True' yields '--quiet'
    Boolean values are interpreted as flags: present if True, absent if False.
    All other values are treated as option arguments, as in the -b example above.
    If an option argument is a list, that option is repeated multiple times,
    e.g. 'q=['ab', 'bc']' yields '-q ab -q bc'

    q_colon is handled specially, mapping to '--q:'.

    Run 'vw -h' for a listing of most options.

    Defaults are well-suited for use with Wabbit Wappa:
    vw --predictions /dev/stdout --quiet --save_resume

    NOTE: This function makes no attempt to validate the inputs or
    ensure they are compatible with Wabbit Wappa.

    Outputs a command line string.
     N/A args N/A vw N/A q_colon N/A N/A N/A kwargs N/A q: q_colon N/A N/A kwargs N/A predictions predictions N/A N/A kwargs N/A quiet quiet N/A N/A kwargs N/A save_resume save_resume N/A N/A key value N/A N/A kwargs items N/A N/A N/A N/A len key 1 N/A N/A option N/A N/A -{} format key N/A N/A option N/A N/A --{} format key N/A N/A value True N/A N/A arg_list N/A option N/A N/A N/A isinstance value basestring N/A N/A arg_list N/A N/A N/A {} {} format option value N/A N/A N/A hasattr value __getitem__ N/A N/A arg_list N/A N/A N/A {} {} format option subvalue N/A subvalue value N/A N/A arg_list N/A N/A N/A {} {} format option value N/A N/A N/A args extend arg_list N/A command N/A N/A join args N/A command N/A