def _key_value_callback(option, opt_str, value, parser):
 try:
  (k, v) = value.split('=', 1)
 except ValueError:
  parser.error(('%s argument %r is not of the form KEY=VALUE' % (opt_str, value)))
 _default_to(parser, option.dest, {})
 getattr(parser.values, option.dest)[k] = v

def _key_value_callback ( option , opt_str , value , parser ) : try : ( k , v ) = value . split ( '=' , 1 ) except ValueError : parser . error ( ( '%s argument %r is not of the form KEY=VALUE' % ( opt_str , value ) ) ) _default_to ( parser , option . dest , { } ) getattr ( parser . values , option . dest ) [ k ] = v
callback for key=value pairs .