In article <313a27f9-c655-4fc4-a8e3-568a4283b...@f40g2000pri.googlegroups.com>,
ag73  <andygrov...@gmail.com> wrote:
>
>                       form = urllib.parse.parse_qs(qs, keep_blank_values=1)
>
>However, the last line of code that calls parse_qs causes the
>following exception to be thrown:
>
><class 'TypeError'>
>Type str doesn't support the buffer API

One of the key features of Python 3.0 is the fact that it now
distinguishes between bytes and strings.  Unfortunately, there are a lot
of ambiguous areas where the correct handling is not clear; for example,
nobody has yet agreed whether URLs are strings or bytes.  As you
discovered, forced conversion to string seems to work here and I suggest
you make that your workaround.  You could also file a bug on
bugs.python.org (first checking to see whether someone else has already
done so).
-- 
Aahz (a...@pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to