Nick Coghlan <ncogh...@gmail.com> added the comment:

As David noted, we updated all the URL parsing functions to be polymorphic back 
in 3.2: 
https://docs.python.org/3/library/urllib.parse.html#parsing-ascii-encoded-bytes

We left the quoting functions alone, because they already had their own way of 
dealing with the bytes-vs-str distinction (quote_from_bytes, unquote_to_bytes, 
etc) that meant the polymorphic approach we adopted for the parsing functions 
didn't make sense.

That said, I think it would be reasonable to enhance unquote() to accept a 
bytes object, processing it as follows:

    unquote_to_bytes(string).decode(encoding, errors)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32498>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to