<s> '''<STR_LIT>''' <EOL> from python_toolbox import cute_inspect <EOL> from python_toolbox . nifty_collections import OrderedDict <EOL> def get_default_args_dict ( function ) : <EOL> '''<STR_LIT>''' <EOL> arg_spec = cute_inspect . getargspec ( function ) <EOL> ( s_args , s_star_args , s_star_kwargs , s_defaults ) = arg_spec <EOL> if s_defaults is None : <EOL> s_defaults = ( ) <EOL> n_defaultful_args = len ( s_defaults ) <EOL> defaultful_args = s_args [ - n_defaultful_args : ] if n_defaultful_args else [ ] <EOL> return OrderedDict ( zip ( defaultful_args , s_defaults ) ) </s>
