def parsedotval(s):
 if (type(s) is tuple):
  (o, val) = s
  val = parse_value(val)
 else:
  (o, val) = keyvaluesplit(s)
 keys = o.split(u'.')
 if (len(keys) > 1):
  r = (keys[0], {})
  rcur = r[1]
  for key in keys[1:(-1)]:
   rcur[key] = {}
   rcur = rcur[key]
  rcur[keys[(-1)]] = val
  return r
 else:
  return (o, val)

def parsedotval ( s ) : if ( type ( s ) is tuple ) : ( o , val ) = s val = parse_value ( val ) else : ( o , val ) = keyvaluesplit ( s ) keys = o . split ( u'.' ) if ( len ( keys ) > 1 ) : r = ( keys [ 0 ] , { } ) rcur = r [ 1 ] for key in keys [ 1 : ( - 1 ) ] : rcur [ key ] = { } rcur = rcur [ key ] rcur [ keys [ ( - 1 ) ] ] = val return r else : return ( o , val )
parse k1 .