def from_urlencoded(self, urlencoded, **kwargs):
<EOL>if isinstance(urlencoded, str):<EOL><INDENT>pass<EOL><DEDENT>elif isinstance(urlencoded, list):<EOL><INDENT>urlencoded = urlencoded[<NUM_LIT:0>]<EOL><DEDENT>_spec = self.c_param<EOL>_info = parse_qs(urlencoded)<EOL>if len(urlencoded) and _info == {}:<EOL><INDENT>raise FormatError('<STR_LIT>')<EOL><DEDENT>for key, val in _info.items():<EOL><INDENT>try:<EOL><INDENT>(typ, _, _, _deser, null_allowed) = _spec[key]<EOL><DEDENT>except KeyError:<EOL><INDENT>try:<EOL><INDENT>_key, lang = key.split("<STR_LIT:#>")<EOL>(typ, _, _, _deser, null_allowed) = _spec[_key]<EOL><DEDENT>except (ValueError, KeyError):<EOL><INDENT>try:<EOL><INDENT>(typ, _, _, _deser, null_allowed) = _spec['<STR_LIT:*>']<EOL><DEDENT>except KeyError:<EOL><INDENT>if len(val) == <NUM_LIT:1>:<EOL><INDENT>val = val[<NUM_LIT:0>]<EOL><DEDENT>self._dict[key] = val<EOL>continue<EOL><DEDENT><DEDENT><DEDENT>if isinstance(typ, list):<EOL><INDENT>if _deser:<EOL><INDENT>self._dict[key] = _deser(val[<NUM_LIT:0>], "<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self._dict[key] = val<EOL><DEDENT><DEDENT>else:  <EOL><INDENT>if len(val) == <NUM_LIT:1>:<EOL><INDENT>if _deser:<EOL><INDENT>self._dict[key] = _deser(val[<NUM_LIT:0>], "<STR_LIT>")<EOL><DEDENT>elif isinstance(val[<NUM_LIT:0>], typ):<EOL><INDENT>self._dict[key] = val[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>self._dict[key] = val[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise TooManyValues('<STR_LIT:{}>'.format(key))<EOL><DEDENT><DEDENT><DEDENT>return self<EOL>
Starting with a string of the application/x-www-form-urlencoded format 
this method creates a class instance

:param urlencoded: The string
:return: A class instance or raise an exception on error