def dict_from_dotted_str(items):
 args = {}
 for (key, value) in items:
  parts = key.split('.')
  key = str(camelcase_to_underscore(parts[0]))
  if isinstance(value, six.string_types):
   value = _try_convert(value)
   if (len(parts) > 1):
    d = args.get(key, {})
    args[key] = d
    for k in parts[1:(-1)]:
     k = camelcase_to_underscore(k)
     v = d.get(k, {})
     d[k] = v
     d = v
    d[camelcase_to_underscore(parts[(-1)])] = value
   else:
    args[key] = value
 return args

def dict_from_dotted_str ( items ) : args = { } for ( key , value ) in items : parts = key . split ( '.' ) key = str ( camelcase_to_underscore ( parts [ 0 ] ) ) if isinstance ( value , six . string_types ) : value = _try_convert ( value ) if ( len ( parts ) > 1 ) : d = args . get ( key , { } ) args [ key ] = d for k in parts [ 1 : ( - 1 ) ] : k = camelcase_to_underscore ( k ) v = d . get ( k , { } ) d [ k ] = v d = v d [ camelcase_to_underscore ( parts [ ( - 1 ) ] ) ] = value else : args [ key ] = value return args
parse multi dot-separated argument into dict .