urllib - {quote,unquote} vs. {quote_plus,unquote_plus}
July 28, 2000
12:17 p.m.
I realize there is a symmetry between the functionality of urllib.{quote,unquote} and urllib.{quote_plus,unquote_plus}, but why doesn't unquote function like unquote_plus and map "+" to " "? Skip
July 2000
3:34 p.m.
I realize there is a symmetry between the functionality of urllib.{quote,unquote} and urllib.{quote_plus,unquote_plus}, but why doesn't unquote function like unquote_plus and map "+" to " "?
The +/space mapping is unique to CGI query strings. The unquote function is used in a lot of places to decode parts of URLs (e.g. throughout urllib.py itself), e.g. the hostname or (more likely) the pathname can be encoded using %xx, and there a + does *not* mean a space. --Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)
9325
Age (days ago)
9327
Last active (days ago)
1 comments
2 participants
participants (2)
-
Guido van Rossum -
Skip Montanaro