> Of course, it's un-Pythonic to enforce pedantry, and we pedants can > use a string->string encoder correctly. Sure. All I was asking was that we not break the existing usage of the standard library "unquote" by producing a string by *assuming* a UTF-8 encoded string is what's in those percent-encoded bytes (instead of, say, ISO 2022-JP). Let the "new" function produce a string: "unquote_as_string". > > You really want me to remove the encoding= named argument? And hard-code > > UTF-8 into these functions? > > A quoting function that accepts bytes *must* have an encoding > argument. Huh? What would it use it for? The string, if string it is, is already encoded as octets. All it needs to do is percent-encode the reserved octets. So far as I can see, the "unquote_as_string" is the function that needs the encoding. Ah, it's too late, I'll pick this up tomorrow. Bill
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4