I am trying to use urllib.quote on DOT character (.) in python but am not getting my desired outptut.
>>> urllib.quote(".")
'.'
>>> urllib.quote_plus(".")
'.'
but when I unquote %2E using urllib.unquote I get
>>> urllib.unquote("%2E")
'.'
So, my question is why am I not able to get %2E as my output when I use quote or quote_plus on .
Dots do not need to be escaped. However,
unquoteconverts all%xxcharacters since it is perfectly valid to encode any character, no matter if necessary or not.