#NEWLINE# def __init__( self , parser_options ) : #NEWLINE# #INDENT# "\n        Initialize argument parser with argument triplets as the following:\n            [\n                ('-j', '--attributes', {}),\n                ...\n                ('-W', '--why_run', {'action': 'store_true'}),\n            ]\n        " #NEWLINE# self . parser = argparse . ArgumentParser ( ) #NEWLINE# self . _name_to_key = defaultdict ( ( lambda : None ) ) #NEWLINE# for ( k , lk , kwargs ) in parser_options : #NEWLINE# #INDENT# long_name = lk . lstrip ( '-' ) #NEWLINE# keys = ( i for i in ( k , lk ) if ( i is not None ) ) #NEWLINE# self . parser . add_argument ( * keys , ** kwargs ) #NEWLINE# self . name_to_key [ long_name ] = k